[vala] Report warning for type arguments in type check expressions



commit cb18370fc70efe1e0b9c935b7032970fafd36ca3
Author: Florian Brosch <flo brosch gmail com>
Date:   Tue Jan 24 21:07:50 2012 +0100

    Report warning for type arguments in type check expressions

 vala/valatypecheck.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/vala/valatypecheck.vala b/vala/valatypecheck.vala
index de3d30a..2214733 100644
--- a/vala/valatypecheck.vala
+++ b/vala/valatypecheck.vala
@@ -116,6 +116,10 @@ public class Vala.TypeCheck : Expression {
 			return false;
 		}
 
+		if (context.profile == Profile.GOBJECT && type_reference.get_type_arguments ().size > 0) {
+			Report.warning (_data_type.source_reference, "Type argument list has no effect");
+		}
+
 		value_type = context.analyzer.bool_type;
 
 		return !error;



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