vala r1644 - in trunk: . vala
- From: jaredm svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1644 - in trunk: . vala
- Date: Mon, 23 Jun 2008 21:29:15 +0000 (UTC)
Author: jaredm
Date: Mon Jun 23 21:29:15 2008
New Revision: 1644
URL: http://svn.gnome.org/viewvc/vala?rev=1644&view=rev
Log:
2008-06-23 Jared Moore <jaredm svn gnome org>
* vala/valasemanticanalyzer.vala:
Report error when trying to access 'class' member statically rather
than through an instance, fixes bug 539594.
Modified:
trunk/ (props changed)
trunk/ChangeLog
trunk/vala/valasemanticanalyzer.vala
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Mon Jun 23 21:29:15 2008
@@ -1753,14 +1753,17 @@
var member = expr.symbol_reference;
var access = SymbolAccessibility.PUBLIC;
bool instance = false;
+ bool klass = false;
if (member is Field) {
var f = (Field) member;
access = f.access;
instance = (f.binding == MemberBinding.INSTANCE);
+ klass = (f.binding == MemberBinding.CLASS);
} else if (member is Method) {
var m = (Method) member;
access = m.access;
instance = (m.binding == MemberBinding.INSTANCE);
+ klass = (m.binding == MemberBinding.CLASS);
} else if (member is Property) {
var prop = (Property) member;
access = prop.access;
@@ -1811,7 +1814,7 @@
return;
}
}
- if (instance && !may_access_instance_members) {
+ if ((instance || klass) && !may_access_instance_members) {
expr.prototype_access = true;
if (expr.symbol_reference is Method) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]