[vala] Report warning for type arguments in typeof expressions



commit 8b31cfa4858482a6eab283d83c9891240b0e17ee
Author: Florian Brosch <flo brosch gmail com>
Date:   Tue Jan 24 21:02:28 2012 +0100

    Report warning for type arguments in typeof expressions

 vala/valatypeofexpression.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/vala/valatypeofexpression.vala b/vala/valatypeofexpression.vala
index 9efb1f5..1154016 100644
--- a/vala/valatypeofexpression.vala
+++ b/vala/valatypeofexpression.vala
@@ -82,6 +82,10 @@ public class Vala.TypeofExpression : Expression {
 
 		value_type = context.analyzer.type_type;
 
+		if (context.profile == Profile.GOBJECT && type_reference.get_type_arguments ().size > 0) {
+			Report.warning (_data_type.source_reference, "Type argument list without effect");
+		}
+
 		return !error;
 	}
 



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