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

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

Issue 1859493002: Replace 'length' with more generic 'extractProperty' operation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/resynthesize_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
index dc8fd6d7f06efddcb450402dcba5449da3e48734..3c8d284fda9cbd4d8eb034d1cd4e84808876abdc 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -480,6 +480,15 @@ abstract class ResynthesizeTest extends AbstractSingleUnitTest {
fail('Prefix of type ${o.prefix.staticElement.runtimeType} should not'
' have been elided');
}
+ } else if (o is SimpleIdentifier && r is PrefixedIdentifier) {
+ // In 'class C {static const a = 0; static const b = a;}' the reference
+ // to 'a' in 'b' is serialized as a fully qualified 'C.a' reference.
+ if (r.prefix.staticElement is ClassElement) {
+ compareConstAsts(r.identifier, o, desc);
Paul Berry 2016/04/04 15:51:25 Please add a check to verify that r.prefix.staticE
+ } else {
+ fail('Prefix of type ${r.prefix.staticElement.runtimeType} should not'
+ ' have been elided');
+ }
} else if (o is PropertyAccess &&
o.target is PrefixedIdentifier &&
r is PrefixedIdentifier) {
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | pkg/analyzer/test/src/summary/summarize_ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698