OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 /*@testedFeatures=checks*/ |
| 6 library test; |
| 7 |
| 8 class C<T> { |
| 9 void f< /*@checkFormal=semiSafe*/ U extends T>(U x) {} |
| 10 void g1< /*@checkFormal=semiSafe*/ U extends T>() { |
| 11 this.f<U>(1.5); |
| 12 } |
| 13 } |
| 14 |
| 15 void g2(C<Object> c) { |
| 16 c.f<num> /*@checkCall=interface(semiTyped:<0>)*/ (1.5); |
| 17 } |
| 18 |
| 19 void test() { |
| 20 new C<int>().g1<num> /*@checkCall=interface(semiTyped:<0>)*/ (); |
| 21 g2(new C<int>()); // runtime error |
| 22 } |
| 23 |
| 24 void main() {} |
OLD | NEW |