| Index: compiler/java/com/google/dart/compiler/resolver/Resolver.java
|
| diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
|
| index 349f7b7b4437e684d32c9aa7f2ef914314e02b6a..84d698d5b952ccdddac0e5dea93beb4f36e45158 100644
|
| --- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
|
| +++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
|
| @@ -781,9 +781,19 @@ public class Resolver {
|
| }
|
| MethodElement previousFunction = innermostFunction;
|
| innermostFunction = element;
|
| - DartFunction functionNode = x.getFunction();
|
| - resolveFunction(functionNode, element);
|
| - resolve(functionNode.getBody());
|
| + {
|
| + DartFunction functionNode = x.getFunction();
|
| + EnclosingElement previousEnclosingElement = enclosingElement;
|
| + enclosingElement = element;
|
| + getContext().pushFunctionScope(x);
|
| + try {
|
| + resolveFunction(functionNode, element);
|
| + resolve(functionNode.getBody());
|
| + } finally {
|
| + getContext().popScope();
|
| + enclosingElement = previousEnclosingElement;
|
| + }
|
| + }
|
| innermostFunction = previousFunction;
|
| getContext().popScope();
|
| if (x.getName() != null) {
|
|
|