[vala] Do not allow access to instance members of outer classes
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Do not allow access to instance members of outer classes
- Date: Sat, 20 Mar 2010 15:24:29 +0000 (UTC)
commit 042e938e2c19249fbe02ed7a6da2df354de31f55
Author: Jürg Billeter <j bitron ch>
Date: Sat Mar 20 16:12:08 2010 +0100
Do not allow access to instance members of outer classes
Fixes bug 595216.
vala/valamemberaccess.vala | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index e910333..f6c5f24 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -250,6 +250,16 @@ public class Vala.MemberAccess : Expression {
}
symbol_reference = analyzer.symbol_lookup_inherited (sym, member_name);
+
+ if (symbol_reference == null) {
+ if (sym is TypeSymbol) {
+ // do not allow instance access to outer classes
+ this_parameter = null;
+ may_access_instance_members = false;
+ may_access_klass_members = false;
+ }
+ }
+
sym = sym.parent_symbol;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]