[vala/0.26] Allow SimpleType object initializer without a default constructor
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.26] Allow SimpleType object initializer without a default constructor
- Date: Mon, 22 Dec 2014 12:47:54 +0000 (UTC)
commit 6b672ea93e26f916b25c0346e575e992ad15d135
Author: Luca Bruno <lucabru src gnome org>
Date: Sun Dec 21 16:06:45 2014 +0100
Allow SimpleType object initializer without a default constructor
Fixes bug 740600
vala/valaobjectcreationexpression.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala
index daf3113..6b18efd 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]