| Index: pkg/analyzer/test/src/task/strong/checker_test.dart
|
| diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
|
| index 343a2aea64f2d536eccfd8990508c8cf5fb9ef5e..6235e9ff30dd829e4b889a5445f1d394bfb0edb2 100644
|
| --- a/pkg/analyzer/test/src/task/strong/checker_test.dart
|
| +++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
|
| @@ -2164,6 +2164,40 @@ dynamic y1 = (<dynamic>[])[0];
|
| check(implicitDynamic: false);
|
| }
|
|
|
| + void test_constantGenericTypeArg_infer() {
|
| + // Regression test for https://github.com/dart-lang/sdk/issues/26141
|
| + checkFile('''
|
| +abstract class Equality<R> {}
|
| +class DefaultEquality<S> implements Equality<S> {
|
| + const DefaultEquality();
|
| +}
|
| +class SetEquality<T> implements Equality<T> {
|
| + final Equality<T> field = const DefaultEquality();
|
| + const SetEquality([Equality<T> inner = const DefaultEquality()]);
|
| +}
|
| +main() {
|
| + const SetEquality<String>();
|
| +}
|
| + ''');
|
| + }
|
| +
|
| + void test_constantGenericTypeArg_explict() {
|
| + // Regression test for https://github.com/dart-lang/sdk/issues/26141
|
| + checkFile('''
|
| +abstract class Equality<R> {}
|
| +class DefaultEquality<S> implements Equality<S> {
|
| + const DefaultEquality();
|
| +}
|
| +class SetEquality<T> implements Equality<T> {
|
| + final Equality<T> field = const DefaultEquality<T>();
|
| + const SetEquality([Equality<T> inner = const DefaultEquality<T>()]);
|
| +}
|
| +main() {
|
| + const SetEquality<String>();
|
| +}
|
| + ''');
|
| + }
|
| +
|
| void test_invalidOverrides_baseClassOverrideToChildInterface() {
|
| checkFile('''
|
| class A {}
|
|
|