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

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

Issue 1584653007: Issue 25504. Fix for ignoring expression bodies in incremental resolver. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/analyzer/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/incremental_resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index 7d6bb4c7ec97d67880a1633394ba2c19fe309f13..90444a167a7f6491e499f71a06c2a0e93dbd67a6 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -1493,12 +1493,16 @@ class PoorMansIncrementalResolver {
found = true;
}
}
- if (oldParent is BlockFunctionBody &&
- newParent is BlockFunctionBody) {
- oldNode = oldParent;
- newNode = newParent;
- found = true;
- break;
+ if (oldParent is FunctionBody || newParent is FunctionBody) {
+ if (oldParent is BlockFunctionBody &&
+ newParent is BlockFunctionBody) {
+ oldNode = oldParent;
+ newNode = newParent;
+ found = true;
+ break;
+ }
+ logger.log('Failure: not a block function body.');
+ return false;
}
}
if (!found) {
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698