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



commit da4d1ec796f1339734f442c57aab959943d76e07
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 f627d1a54..44681c539 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -711,7 +711,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]