]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Allow SimpleType object initializer without a default constructor
authorLuca Bruno <lucabru@src.gnome.org>
Sun, 21 Dec 2014 15:06:45 +0000 (16:06 +0100)
committerLuca Bruno <lucabru@src.gnome.org>
Sun, 21 Dec 2014 15:06:45 +0000 (16:06 +0100)
Fixes bug 740600

vala/valaobjectcreationexpression.vala

index daf31137dcb2f544414494c3f4b9df7f4ce254b6..6b18efddcdd2031352567d2864da64a6c2fb7a71 100644 (file)
@@ -298,7 +298,7 @@ public class Vala.ObjectCreationExpression : Expression {
                                symbol_reference = st.default_construction_method;
                        }
 
-                       if (st.is_simple_type () && symbol_reference == null) {
+                       if (st.is_simple_type () && symbol_reference == null && object_initializer.size == 0) {
                                error = true;
                                Report.error (source_reference, "`%s' does not have a default constructor".printf (st.get_full_name ()));
                                return false;