From: Jürg Billeter Date: Sun, 29 May 2011 19:30:30 +0000 (+0200) Subject: dova: Allow structs without default constructor X-Git-Tag: 0.13.0~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=714e454714bbba971d6b1844f04a77c77407db0f;p=thirdparty%2Fvala.git dova: Allow structs without default constructor --- diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala index 630f74a07..82e998bf4 100644 --- a/vala/valaobjectcreationexpression.vala +++ b/vala/valaobjectcreationexpression.vala @@ -295,7 +295,7 @@ public class Vala.ObjectCreationExpression : Expression { symbol_reference = st.default_construction_method; } - if (st.is_simple_type () && symbol_reference == null) { + if (context.profile == Profile.GOBJECT && st.is_simple_type () && symbol_reference == null) { error = true; Report.error (source_reference, "`%s' does not have a default constructor".printf (st.get_full_name ())); return false;