| Index: pkg/analyzer/test/src/task/strong/inferred_type_test.dart
|
| diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
|
| index 8114c01e0c360aecf596c1b2884a17d4294499f7..b6311e66cd94e09b53a367c60c830995c9a54bc3 100644
|
| --- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
|
| +++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
|
| @@ -1086,7 +1086,7 @@ main() {
|
| // Regression test for https://github.com/dart-lang/sdk/issues/25740.
|
| checkFile(r'''
|
| class Foo<T extends Pattern> {
|
| -void method/*<U extends T>*/(dynamic/*=U*/ u) {}
|
| + void method/*<U extends T>*/(dynamic/*=U*/ u) {}
|
| }
|
| main() {
|
| new Foo().method/*<String>*/("str");
|
| @@ -2439,6 +2439,58 @@ main() {
|
| ''');
|
| }
|
|
|
| + void test_instantiateToBounds_generic2_hasBound_definedAfter() {
|
| + var unit = checkFile(r'''
|
| +class B<T extends A> {}
|
| +class A<T extends int> {}
|
| +B v = null;
|
| +''');
|
| + expect(unit.topLevelVariables[0].type.toString(), 'B<A<dynamic>>');
|
| + }
|
| +
|
| + void test_instantiateToBounds_generic2_hasBound_definedBefore() {
|
| + var unit = checkFile(r'''
|
| +class A<T extends int> {}
|
| +class B<T extends A> {}
|
| +B v = null;
|
| +''');
|
| + expect(unit.topLevelVariables[0].type.toString(), 'B<A<dynamic>>');
|
| + }
|
| +
|
| + void test_instantiateToBounds_generic2_noBound() {
|
| + var unit = checkFile(r'''
|
| +class A<T> {}
|
| +class B<T extends A> {}
|
| +B v = null;
|
| +''');
|
| + expect(unit.topLevelVariables[0].type.toString(), 'B<A<dynamic>>');
|
| + }
|
| +
|
| + void test_instantiateToBounds_generic_hasBound_definedAfter() {
|
| + var unit = checkFile(r'''
|
| +A v = null;
|
| +class A<T extends int> {}
|
| +''');
|
| + expect(unit.topLevelVariables[0].type.toString(), 'A<int>');
|
| + }
|
| +
|
| + void test_instantiateToBounds_generic_hasBound_definedBefore() {
|
| + var unit = checkFile(r'''
|
| +class A<T extends int> {}
|
| +A v = null;
|
| +''');
|
| + expect(unit.topLevelVariables[0].type.toString(), 'A<int>');
|
| + }
|
| +
|
| + void test_instantiateToBounds_notGeneric() {
|
| + var unit = checkFile(r'''
|
| +class A {}
|
| +class B<T extends A> {}
|
| +B v = null;
|
| +''');
|
| + expect(unit.topLevelVariables[0].type.toString(), 'B<A>');
|
| + }
|
| +
|
| void test_listLiterals() {
|
| checkFile(r'''
|
| test1() {
|
|
|