From: Jürg Billeter Date: Sat, 20 Mar 2010 16:14:01 +0000 (+0100) Subject: Support explicit constructors for boolean, integer, and floating types X-Git-Tag: 0.8.0~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce379f311055bab639343b09fb058e5ba1299427;p=thirdparty%2Fvala.git Support explicit constructors for boolean, integer, and floating types --- diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala index 1f9a4396c..e519b779f 100644 --- a/vala/valamethodcall.vala +++ b/vala/valamethodcall.vala @@ -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;