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

Unified Diff: pkg/analyzer/test/src/summary/element_text.dart

Issue 2815713003: Issue 29109. Resynthesize PrefixElement(s) to fix constants evaluation. (Closed)
Patch Set: Created 3 years, 8 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/test/src/summary/element_text.dart
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index f0767f1c9708467ed51b78aef80f2f26859fdf69..ef183f4b0de6faf8663465de44adff1993ebb61f 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -807,8 +807,10 @@ class _ElementWriter {
ElementLocation location = element.location;
List<String> components = location.components.toList();
- if (components.length > 2) {
+ if (components.length > 1) {
Brian Wilkerson 2017/04/11 18:16:35 Shouldn't this be ">= 1"? (and similarly on line 8
scheglov 2017/04/11 18:27:13 Yes, I think you're right, it's cleaner to check f
components[0] = onlyName(components[0]);
+ }
+ if (components.length > 2) {
components[1] = onlyName(components[1]);
if (components[0] == components[1]) {
components.removeAt(0);
« no previous file with comments | « pkg/analyzer/test/generated/non_error_resolver_test.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698