[vala/0.36] vala: Parser doesn't ensure "protected" to be applied on TypeSymbol members



commit 566605ddeed55afc62bb394a40030ec4fefd86a8
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Jan 26 21:23:22 2019 +0100

    vala: Parser doesn't ensure "protected" to be applied on TypeSymbol members
    
    Probably ObjectTypeSymbol should be enforced.

 vala/valamemberaccess.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 913fa05ae..a57e68cad 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -700,7 +700,7 @@ public class Vala.MemberAccess : Expression {
                member.used = true;
                member.version.check (source_reference);
 
-               if (access == SymbolAccessibility.PROTECTED) {
+               if (access == SymbolAccessibility.PROTECTED && member.parent_symbol is TypeSymbol) {
                        var target_type = (TypeSymbol) member.parent_symbol;
 
                        bool in_subtype = false;


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