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..e48b38b4b13df11bf234d75260a15b99a45a220a 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) {} |
+ T f2(List<T> /*@checkFormal=semiSafe*/ x) => x.first; |
} |
-void g1(C<num> c) { |
- c.f; |
+F<num> g1(C<num> c) { |
+ return 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.f2; |
+} |
+ |
void test() { |
var x = g1(new C<int>()); |
x /*@checkCall=interface(semiTyped:0)*/ (1.5); |
+ g3(new C<int>()); |
} |
main() {} |