| Index: lib/compiler/implementation/elements/elements.dart
|
| ===================================================================
|
| --- lib/compiler/implementation/elements/elements.dart (revision 11862)
|
| +++ lib/compiler/implementation/elements/elements.dart (working copy)
|
| @@ -648,9 +648,7 @@
|
|
|
| DartType get type => variables.type;
|
|
|
| - bool isInstanceMember() {
|
| - return isMember() && !modifiers.isStatic();
|
| - }
|
| + bool isInstanceMember() => variables.isInstanceMember();
|
|
|
| // Note: cachedNode.getBeginToken() will not be correct in all
|
| // cases, for example, for function typed parameters.
|
| @@ -759,6 +757,19 @@
|
| }
|
| return result;
|
| }
|
| +
|
| + bool isInstanceMember() {
|
| + return isMember() && !modifiers.isStatic();
|
| + }
|
| +
|
| + Scope buildScope() {
|
| + Scope result = new VariableScope(enclosingElement.buildScope(), this);
|
| + if (enclosingElement.isClass()) {
|
| + ClassScope clsScope = result.parent;
|
| + clsScope.inStaticContext = !isInstanceMember();
|
| + }
|
| + return result;
|
| + }
|
| }
|
|
|
| class ForeignElement extends Element {
|
| @@ -985,6 +996,15 @@
|
| result.type = type;
|
| return result;
|
| }
|
| +
|
| + Scope buildScope() {
|
| + Scope result = new MethodScope(enclosingElement.buildScope(), this);
|
| + if (enclosingElement.isClass()) {
|
| + ClassScope clsScope = result.parent;
|
| + clsScope.inStaticContext = !isInstanceMember() && !isConstructor();
|
| + }
|
| + return result;
|
| + }
|
| }
|
|
|
|
|
|
|