]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
dova: Allow structs without default constructor
authorJürg Billeter <j@bitron.ch>
Sun, 29 May 2011 19:30:30 +0000 (21:30 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 29 May 2011 19:30:30 +0000 (21:30 +0200)
vala/valaobjectcreationexpression.vala

index 630f74a07f8a46c3ac8e17253a56ce7e0061adca..82e998bf441d40c5cd379e054b219d47ebd41cd0 100644 (file)
@@ -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;