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



commit 9c130ffe0e099a722cb21ba3102f8c6ab40e26da
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 4b131ae47..e148fa276 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]