[vala] Do not support constructors for boolean, integer, and floating types
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Do not support constructors for boolean, integer, and floating types
- Date: Sat, 20 Mar 2010 16:06:08 +0000 (UTC)
commit 0d8ce26878a96e7f18d55fa402977afd14e49bad
Author: Jürg Billeter <j bitron ch>
Date: Sat Mar 20 17:02:36 2010 +0100
Do not support constructors for boolean, integer, and floating types
Fixes bug 578968.
vala/valamethodcall.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala
index 4b99a25..1f9a439 100644
--- a/vala/valamethodcall.vala
+++ b/vala/valamethodcall.vala
@@ -208,6 +208,13 @@ public class Vala.MethodCall : Expression {
((call.symbol_reference is CreationMethod
&& 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 ())) {
+ error = true;
+ Report.error (source_reference, "invocation not supported in this context");
+ return false;
+ }
+
if (is_chainup ()) {
var cm = analyzer.find_current_method () as CreationMethod;
if (cm != null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]