2008-06-04 Jürg Billeter <j@bitron.ch>
+ * gobject/valaccodeassignmentbinding.vala:
+ * gobject/valaccodegenerator.vala:
+
+ Fix error reporting when duplicating non-reference counted objects,
+ fixes bug 535849
+
+2008-06-04 Jürg Billeter <j@bitron.ch>
+
* vapigen/valagidlparser.vala:
Support 'cheader_filename' attribute for fields and methods,
public override void emit () {
assignment.accept_children (codegen);
+ if (assignment.left.error || assignment.right.error) {
+ assignment.error = true;
+ return;
+ }
+
if (assignment.left.symbol_reference is Property) {
emit_property_assignment ();
} else if (assignment.left.symbol_reference is Signal) {
var cblock = new CCodeBlock ();
foreach (CodeNode stmt in b.get_statements ()) {
+ if (stmt.error) {
+ continue;
+ }
+
var src = stmt.source_reference;
if (src != null && src.comment != null) {
cblock.add_statement (new CCodeComment (src.comment));
}
public override void visit_expression_statement (ExpressionStatement stmt) {
+ if (stmt.expression.error) {
+ stmt.error = true;
+ return;
+ }
+
stmt.ccodenode = new CCodeExpressionStatement ((CCodeExpression) stmt.expression.ccodenode);
if (stmt.tree_can_fail && stmt.expression.tree_can_fail) {
if (target_type.value_owned && (!expression_type.value_owned || boxing || unboxing)) {
// need to copy value
if (requires_copy (target_type) && !(expression_type is NullType)) {
- cexpr = get_ref_cexpression (target_type, cexpr, expr, expression_type);
+ CodeNode node = expr;
+ if (node == null) {
+ node = expression_type;
+ }
+ cexpr = get_ref_cexpression (target_type, cexpr, expr, node);
}
}