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

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

Issue 1895923003: Verify a corner case of const constructor cycle detection with summaires. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/linker_test.dart
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
index 59edb00bd506dcd541fca62fb97f0e0007eb0e26..d7526aba95806367b99c7fdc098bfe3001b9feb3 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -109,6 +109,19 @@ class C extends B {
// No assertions--just make sure it doesn't crash.
}
+ void test_constCycle_viaLength() {
+ createLinker('''
+class C {
+ final y;
+ const C() : y = x.length;
+}
+const x = [const C()];
+''');
+ testLibrary.libraryCycleForLink.ensureLinked();
+ ClassElementForLink classC = testLibrary.getContainedName('C');
+ expect(classC.unnamedConstructor.isCycleFree, false);
+ }
+
void test_inferredType_instanceField_dynamic() {
createLinker('''
var x;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698