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 73561292fb44a59a8034b19f13b18e3329304b0e..ae60924c2afed7a8c46ffa7ca754f581a796dd93 100644 |
--- a/pkg/analyzer/test/generated/strong_mode_test.dart |
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart |
@@ -1450,11 +1450,28 @@ class D<S> { |
} |
test_genericFunction_upwardsAndDownwards() async { |
- // Regression tests for https://github.com/dart-lang/sdk/issues/27151. |
+ // Regression tests for https://github.com/dart-lang/sdk/issues/27586. |
await resolveTestUnit(r'List<num> x = [1, 2];'); |
- expectInitializerType('x', 'List<int>'); |
+ expectInitializerType('x', 'List<num>'); |
} |
+ test_genericFunction_upwardsAndDownwards_Object() async { |
+ // Regression tests for https://github.com/dart-lang/sdk/issues/27625. |
+ await 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()]; |
+ '''); |
+ expectInitializerType('aaa', 'List<Object>'); |
+ expectInitializerType('bbb', 'List<Object>'); |
+ expectInitializerType('ccc', 'List<Object>'); |
+ expectInitializerType('ddd', 'List<Object>'); |
+ expectInitializerType('eee', 'List<Object>'); |
+ } |
+ |
+ |
test_genericMethod() async { |
await resolveTestUnit(r''' |
class C<E> { |