| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Test that F-bounded quantification works for generic methods, and that types | 5 // Test that F-bounded quantification works for generic methods, and that types |
| 6 // that are passed to generic methods in dynamic calls are checked for being | 6 // that are passed to generic methods in dynamic calls are checked for being |
| 7 // recursively defined. | 7 // recursively defined. |
| 8 | 8 |
| 9 library generic_methods_recursive_bound_test; | 9 library generic_methods_recursive_bound_test; |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 main() { | 27 main() { |
| 28 foo<C>(<C>[new C(), new C()]); //# 01: ok | 28 foo<C>(<C>[new C(), new C()]); //# 01: ok |
| 29 | 29 |
| 30 dynamic bar = foo; | 30 dynamic bar = foo; |
| 31 List<int> list2 = <int>[4, 2]; | 31 List<int> list2 = <int>[4, 2]; |
| 32 // The type int does not extend I<int>. | 32 // The type int does not extend I<int>. |
| 33 foo<int>(list2); //# 02: compile-time error | 33 foo<int>(list2); //# 02: compile-time error |
| 34 bar<int>(list2); //# 03: runtime error | 34 bar<int>(list2); //# 03: runtime error |
| 35 } | 35 } |
| OLD | NEW |