[vala] dova: Allow structs without default constructor
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] dova: Allow structs without default constructor
- Date: Sun, 29 May 2011 19:34:21 +0000 (UTC)
commit 714e454714bbba971d6b1844f04a77c77407db0f
Author: Jürg Billeter <j bitron ch>
Date: Sun May 29 21:30:30 2011 +0200
dova: Allow structs without default constructor
vala/valaobjectcreationexpression.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala
index 630f74a..82e998b 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]