Chromium Code Reviews| 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 7f80ef3dd2c97de5b519581b00e0bd87393c9472..9f75d5dbdf85208b1f3cfa54df7bf02fd7c31957 100644 |
| --- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart |
| +++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart |
| @@ -1714,7 +1714,6 @@ main() { |
| '''); |
| }); |
| - |
| test('inferred generic instantiation', () { |
| checkFile(''' |
| import 'dart:math' as math; |
| @@ -1836,6 +1835,22 @@ main() { |
| '''); |
| }); |
| + // Regression test for crash when adding genericity |
| + test('handle override of non-generic with generic', () { |
| + checkFile(''' |
| +class C { |
| + m(x) => x; |
| +} |
| +class D extends C { |
| + /*=T*/ m/*<T>*/(/*=T*/ x) => x; |
|
Jennifer Messerly
2016/03/06 20:20:19
do/should we also have test cases for when the par
Leaf
2016/03/07 18:40:28
Yes, there's one above ("infer generic method type
|
| +} |
| +main() { |
| + int y = /*info:DYNAMIC_CAST*/(new D() as C).m(42); |
| + print(y); |
| +} |
| + '''); |
| + }); |
| + |
| test('correctly recognize generic upper bound', () { |
| // Regression test for https://github.com/dart-lang/sdk/issues/25740. |
| checkFile(r''' |
| @@ -1893,7 +1908,6 @@ void functionExpressionInvocation() { |
| } |
| '''); |
| }); |
| - |
| }); |
| // Regression test for https://github.com/dart-lang/dev_compiler/issues/47 |