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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1002893002: Cherry-pick r44410 and r44412 (Closed) Base URL: https://dart.googlecode.com/svn/trunk/dart
Patch Set: Created 5 years, 9 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: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index fb22d618878d10acde34b4840ee13a9bdbc106dc..b07e4d7b1079bf130478234644fc5a08c06fa588 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -14843,6 +14843,17 @@ class VariableResolverVisitor extends ScopedVisitor {
}
@override
+ Object visitMethodDeclaration(MethodDeclaration node) {
+ ExecutableElement outerFunction = _enclosingFunction;
+ try {
+ _enclosingFunction = node.element;
+ return super.visitMethodDeclaration(node);
+ } finally {
+ _enclosingFunction = outerFunction;
+ }
+ }
+
+ @override
Object visitFunctionExpression(FunctionExpression node) {
if (node.parent is! FunctionDeclaration) {
ExecutableElement outerFunction = _enclosingFunction;

Powered by Google App Engine
This is Rietveld 408576698