[vala] Report warning for type arguments in typeof expressions
- From: JÃrg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Report warning for type arguments in typeof expressions
- Date: Thu, 26 Jan 2012 20:26:56 +0000 (UTC)
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]