From ce379f311055bab639343b09fb058e5ba1299427 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Sat, 20 Mar 2010 17:14:01 +0100 Subject: [PATCH] Support explicit constructors for boolean, integer, and floating types --- vala/valamethodcall.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2