Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/resolution/scope.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/resolution/scope.dart b/sdk/lib/_internal/compiler/implementation/resolution/scope.dart |
| index 0af9fd78b325db9e25abd819366a322b2e4fb601..77cc5da43cf4e6cbfda0e759c4d237385534ed5d 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/resolution/scope.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/resolution/scope.dart |
| @@ -41,6 +41,24 @@ abstract class NestedScope extends Scope { |
| } |
| } |
| +class VariableDefinitionScope extends NestedScope { |
| + final SourceString variableName; |
| + bool variableReferencedInInitializer = false; |
| + |
| + VariableDefinitionScope(Scope parent, this.variableName) : super(parent); |
| + |
| + Element localLookup(SourceString name) { |
| + if (name == variableName) { |
| + variableReferencedInInitializer = true; |
| + } |
| + return null; |
| + } |
| + |
| + Element add(Element newElement) { |
| + throw "Cannot add element to TypeDeclarationScope"; |
|
ngeoffray
2013/09/10 11:39:48
TypeDeclarationScope -> VariableDefinitionScope
karlklose
2013/09/10 11:45:53
Done.
|
| + } |
| +} |
| + |
| /** |
| * [TypeDeclarationScope] defines the outer scope of a type declaration in |
| * which the declared type variables and the entities in the enclosing scope are |