summaryrefslogtreecommitdiff
path: root/vala
diff options
context:
space:
mode:
Diffstat (limited to 'vala')
-rw-r--r--vala/valamemberaccess.vala2
1 files changed, 1 insertions, 1 deletions
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;