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

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

Issue 1841853002: Fix summary detection of cycles via redirect/super arguments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « pkg/analyzer/lib/src/summary/link.dart ('k') | 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/summary_common.dart
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 31b28722e7b6be1a3782c0ab4f322fad0cb75169..a8dde28e7783bbb411871174cbc83362c16bb26c 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -4226,6 +4226,21 @@ class C extends B {
checkConstCycle('C', name: 'named', hasCycle: false);
}
+ test_constructorCycle_viaRedirectArgument() {
+ serializeLibraryText(
+ '''
+class C {
+ final x;
+ const C() : this.named(y);
+ const C.named(this.x);
+}
+const y = const C();
+''',
+ allowErrors: true);
+ checkConstCycle('C');
+ checkConstCycle('C', name: 'named', hasCycle: false);
+ }
+
test_constructorCycle_viaStaticField_inOtherClass() {
serializeLibraryText(
'''
@@ -4254,6 +4269,23 @@ class C {
checkConstCycle('C');
}
+ test_constructorCycle_viaSuperArgument() {
+ serializeLibraryText(
+ '''
+class B {
+ final x;
+ const B(this.x);
+}
+class C extends B {
+ const C() : super(y);
+}
+const y = const C();
+''',
+ allowErrors: true);
+ checkConstCycle('B', hasCycle: false);
+ checkConstCycle('C');
+ }
+
test_constructorCycle_viaSupertype() {
serializeLibraryText('''
class C {
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698