Chromium Code Reviews| Index: pkg/analyzer/test/generated/strong_mode_test.dart |
| diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart |
| index 783b462616b95a008052c4bdf2b34804f196ce59..550e4a651492d39bab309e007cba9995a501c151 100644 |
| --- a/pkg/analyzer/test/generated/strong_mode_test.dart |
| +++ b/pkg/analyzer/test/generated/strong_mode_test.dart |
| @@ -1452,11 +1452,28 @@ class D<S> { |
| } |
| void test_genericFunction_upwardsAndDownwards() { |
| - // Regression tests for https://github.com/dart-lang/sdk/issues/27151. |
| + // Regression tests for https://github.com/dart-lang/sdk/issues/27586. |
| resolveTestUnit(r'List<num> x = [1, 2];'); |
| - expectInitializerType('x', 'List<int>'); |
| + expectInitializerType('x', 'List<num>'); |
| } |
| + void test_genericFunction_upwardsAndDownwards_Object() { |
|
Leaf
2016/11/30 05:24:30
Can you add a version of this using generic method
|
| + // Regression tests for https://github.com/dart-lang/sdk/issues/27625. |
| + resolveTestUnit(r''' |
| +List<Object> aaa = []; |
| +List<Object> bbb = [1, 2, 3]; |
| +List<Object> ccc = [null]; |
| +List<Object> ddd = [1 as dynamic]; |
| +List<Object> eee = [new Object()]; |
|
Leaf
2016/11/30 05:24:29
Do we have any test cases for inference which uses
|
| + '''); |
| + expectInitializerType('aaa', 'List<Object>'); |
| + expectInitializerType('bbb', 'List<Object>'); |
| + expectInitializerType('ccc', 'List<Object>'); |
| + expectInitializerType('ddd', 'List<Object>'); |
| + expectInitializerType('eee', 'List<Object>'); |
| + } |
| + |
| + |
| void test_genericMethod() { |
| resolveTestUnit(r''' |
| class C<E> { |