Chromium Code Reviews| Index: pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart |
| diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart |
| index ecc944d8372ca27db1f31495d2a2513bb85fbbe6..a6d7d338309ee702738c7950cf114749f7f26ff6 100644 |
| --- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart |
| +++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart |
| @@ -7,12 +7,15 @@ library test; |
| typedef void F<T>(T x); |
| +typedef U G<T, U>(T x); |
| + |
| class C<T> { |
| - void f(T /*@checkFormal=semiSafe*/ x) {} |
| + void f1(T /*@checkFormal=semiSafe*/ x) {} |
| + void f2(List<T> /*@checkFormal=semiSafe*/ x) {} |
| } |
| void g1(C<num> c) { |
| - c.f; |
| + c.f1; |
| } |
| void g2(C<int> c, Object x) { |
| @@ -20,9 +23,14 @@ void g2(C<int> c, Object x) { |
| f /*@checkCall=interface(semiTyped:0)*/ (x); |
| } |
| +G<List<num>, num> g3(C<num> c) { |
| + return c. /*@checkTearOff=(List<num>) -> num*/ f2; |
|
danrubel
2017/08/22 21:17:45
Trying to wrap my brain around this...
G defines
Paul Berry
2017/08/22 22:01:29
Whoops, I got this wrong. PTAL.
|
| +} |
| + |
| void test() { |
| var x = g1(new C<int>()); |
| x /*@checkCall=interface(semiTyped:0)*/ (1.5); |
| + g3(new C<int>()); |
| } |
| main() {} |