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

Unified Diff: pkg/analysis_server/lib/src/services/correction/fix_internal.dart

Issue 1144893002: Issue 23481. Fix for creating a new class referenced from an inner local function. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/correction/fix_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/correction/fix_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 9e4e8b17c09c6b577f22ddfa6ab4222c6ec4b694..bd00f6cd170da38a4895c3829a5d0b65783166c1 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -378,7 +378,7 @@ class FixProcessor {
String name = (node as SimpleIdentifier).name;
// prepare environment
CompilationUnitMember enclosingMember =
- node.getAncestor((node) => node is CompilationUnitMember);
+ node.getAncestor((node) => node.parent is CompilationUnit);
if (enclosingMember == null) {
return;
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/correction/fix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698