]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Report warning for type arguments in type check expressions
authorFlorian Brosch <flo.brosch@gmail.com>
Tue, 24 Jan 2012 20:07:50 +0000 (21:07 +0100)
committerJürg Billeter <j@bitron.ch>
Thu, 26 Jan 2012 20:11:46 +0000 (21:11 +0100)
vala/valatypecheck.vala

index de3d30a2906aa8c0625cc74a113ef5aa8fa5ec0d..22147334aaee0a2c259399c9dbace39c9bd9c28b 100644 (file)
@@ -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;