| 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 181376cc4c6665d31f92b06a1e255d9d885673be..69a1d295c424971e0a872a0f8b9155fe95318228 100644
|
| --- a/pkg/analyzer/test/src/summary/summary_common.dart
|
| +++ b/pkg/analyzer/test/src/summary/summary_common.dart
|
| @@ -4050,6 +4050,42 @@ class C extends E {
|
| checkConstCycle('C', hasCycle: false);
|
| }
|
|
|
| + test_constructorCycle_viaSupertype_explicit() {
|
| + serializeLibraryText('''
|
| +class C {
|
| + final x;
|
| + const C() : x = const D();
|
| + const C.named() : x = const D.named();
|
| +}
|
| +class D extends C {
|
| + const D() : super();
|
| + const D.named() : super.named();
|
| +}
|
| +''');
|
| + checkConstCycle('C');
|
| + checkConstCycle('C', name: 'named');
|
| + checkConstCycle('D');
|
| + checkConstCycle('D', name: 'named');
|
| + }
|
| +
|
| + test_constructorCycle_viaSupertype_explicit_undefined() {
|
| + // It's not valid Dart but we need to make sure it doesn't crash
|
| + // summary generation.
|
| + serializeLibraryText(
|
| + '''
|
| +class C {
|
| + final x;
|
| + const C() : x = const D();
|
| +}
|
| +class D extends C {
|
| + const D() : super.named();
|
| +}
|
| +''',
|
| + allowErrors: true);
|
| + checkConstCycle('C', hasCycle: false);
|
| + checkConstCycle('D', hasCycle: false);
|
| + }
|
| +
|
| test_constructorCycle_viaSupertype_withDefaultTypeArgument() {
|
| serializeLibraryText('''
|
| class C<T> {
|
|
|