summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2014-12-21 16:06:45 +0100
committerLuca Bruno <lucabru@src.gnome.org>2014-12-22 13:47:44 +0100
commit6b672ea93e26f916b25c0346e575e992ad15d135 (patch)
tree1e2ee8fcfb388431156463280729ba56da9700d9
parent22126ebad3b2133db39bcf301c29c8b78b440f1a (diff)
downloadvala-6b672ea93e26f916b25c0346e575e992ad15d135.tar.gz
Allow SimpleType object initializer without a default constructor
Fixes bug 740600
-rw-r--r--vala/valaobjectcreationexpression.vala2
1 files changed, 1 insertions, 1 deletions
diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala
index daf31137d..6b18efddc 100644
--- a/vala/valaobjectcreationexpression.vala
+++ b/vala/valaobjectcreationexpression.vala
@@ -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;