2008-04-23 Jürg Billeter <j@bitron.ch>
+ * vala/valaforstatement.vala:
+ * ccode/valaccodeforstatement.vala:
+ Fix criticals when using for statements without condition
+
+2008-04-23 Jürg Billeter <j@bitron.ch>
+
* vala/valaenum.vala:
* vapigen/valagidlparser.vala:
Add support for delegate_target_pos metadata attribute
/**
* The loop condition.
*/
- public CCodeExpression condition { get; set; }
+ public CCodeExpression? condition { get; set; }
/**
* The loop body.
private Gee.List<CCodeExpression> initializer = new ArrayList<CCodeExpression> ();
private Gee.List<CCodeExpression> iterator = new ArrayList<CCodeExpression> ();
- public CCodeForStatement (CCodeExpression condition, CCodeStatement? body = null) {
- this.body = body;
+ public CCodeForStatement (CCodeExpression? condition, CCodeStatement? body = null) {
this.condition = condition;
+ this.body = body;
}
/**
* @param source_reference reference to source code
* @return newly created for statement
*/
- public ForStatement (Expression condition, Block body, SourceReference? source_reference = null) {
+ public ForStatement (Expression? condition, Block body, SourceReference? source_reference = null) {
+ this.condition = condition;
this.body = body;
this.source_reference = source_reference;
- this.condition = condition;
}
/**