Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Resolver.java

Issue 10693023: Issue 3897. Don't use method _invocation_ as enclosing Element (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 9071f3e7c557ad18d74232e7127ede91c207ae9a..4fb19716de6e5d83c3ee294ba256fb28c845f920 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -779,6 +779,12 @@ public class Resolver {
getContext().pushFunctionScope(x);
element = getContext().declareFunction(x);
}
+ // record element
+ if (x.getName() != null) {
+ recordElement(x.getName(), element);
+ }
+ recordElement(x, element);
+ // visit function
MethodElement previousFunction = innermostFunction;
innermostFunction = element;
{
@@ -796,10 +802,7 @@ public class Resolver {
}
innermostFunction = previousFunction;
getContext().popScope();
- if (x.getName() != null) {
- recordElement(x.getName(), element);
- }
- return recordElement(x, element);
+ return element;
}
@Override
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/MethodElementImplementation.java ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698