[vala] Support explicit constructors for boolean, integer, and floating types



commit ce379f311055bab639343b09fb058e5ba1299427
Author: Jürg Billeter <j bitron ch>
Date:   Sat Mar 20 17:14:01 2010 +0100

    Support explicit constructors for boolean, integer, and floating types

 vala/valamethodcall.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala
index 1f9a439..e519b77 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]