]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Support explicit constructors for boolean, integer, and floating types
authorJürg Billeter <j@bitron.ch>
Sat, 20 Mar 2010 16:14:01 +0000 (17:14 +0100)
committerJürg Billeter <j@bitron.ch>
Sat, 20 Mar 2010 16:14:01 +0000 (17:14 +0100)
vala/valamethodcall.vala

index 1f9a4396c42573b4cad6fa8cd65564b371b287e2..e519b779f57baa9d54bdc0b9cdf05b8e6be3d6c3 100644 (file)
@@ -209,7 +209,7 @@ public class Vala.MethodCall : Expression {
                      && call.symbol_reference.parent_symbol is Struct)
                     || call.symbol_reference is Struct)) {
                        var st = call.symbol_reference as Struct;
-                       if (st != null && (st.is_boolean_type () || st.is_integer_type () || st.is_floating_type ())) {
+                       if (st != null && st.default_construction_method == null && (st.is_boolean_type () || st.is_integer_type () || st.is_floating_type ())) {
                                error = true;
                                Report.error (source_reference, "invocation not supported in this context");
                                return false;