From 8b31cfa4858482a6eab283d83c9891240b0e17ee Mon Sep 17 00:00:00 2001 From: Florian Brosch Date: Tue, 24 Jan 2012 21:02:28 +0100 Subject: [PATCH] Report warning for type arguments in typeof expressions --- vala/valatypeofexpression.vala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vala/valatypeofexpression.vala b/vala/valatypeofexpression.vala index 9efb1f55c..1154016af 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; } -- 2.47.2