[vala/staging] valainterface: Don't allow 'type' properties



commit 30aa5e54859ab716f010bf0b699cf4fe1c195061
Author: Timm Bäder <mail baedert org>
Date:   Tue Oct 27 09:47:58 2015 +0100

    valainterface: Don't allow 'type' properties
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723258

 vala/valainterface.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/vala/valainterface.vala b/vala/valainterface.vala
index 621c6e8..f80427b 100644
--- a/vala/valainterface.vala
+++ b/vala/valainterface.vala
@@ -204,6 +204,11 @@ public class Vala.Interface : ObjectTypeSymbol {
                        return;
                }
 
+               if (prop.name == "type") {
+                       Report.error (prop.source_reference, "Property 'type' not allowed");
+                       return;
+               }
+
                properties.add (prop);
                scope.add (prop.name, prop);
 


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