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



commit eb014cf42243d0baa6625e8be4d3f25e53bc9b16
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 1bcdea8e0..e07e1ec3f 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]