| 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 generic methods can be overloaded (a) with widened type bounds, and | 5 // Test that generic methods can be overloaded (a) with widened type bounds, and |
| 6 // (b) using the bound as the type of the parameter in the overloaded method. | 6 // (b) using the bound as the type of the parameter in the overloaded method. |
| 7 | 7 |
| 8 library generic_methods_overriding_test; | 8 library generic_methods_overriding_test; |
| 9 | 9 |
| 10 import "package:expect/expect.dart"; | 10 import "package:expect/expect.dart"; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 F f = new F(); | 53 F f = new F(); |
| 54 | 54 |
| 55 Expect.equals(c.fun<Y>(y), "C"); | 55 Expect.equals(c.fun<Y>(y), "C"); |
| 56 Expect.equals(d.fun<Y>(y), "D"); //# 02: continued | 56 Expect.equals(d.fun<Y>(y), "D"); //# 02: continued |
| 57 Expect.equals(e.fun<Y>(y), "E"); //# 04: continued | 57 Expect.equals(e.fun<Y>(y), "E"); //# 04: continued |
| 58 Expect.equals(f.fun<Y>(y), "FY"); //# 05: continued | 58 Expect.equals(f.fun<Y>(y), "FY"); //# 05: continued |
| 59 Expect.equals(f.fun<Z>(z), "FZ"); //# 05: continued | 59 Expect.equals(f.fun<Z>(z), "FZ"); //# 05: continued |
| 60 Expect.equals(f.fun<Y>(y), "FY"); //# 06: continued | 60 Expect.equals(f.fun<Y>(y), "FY"); //# 06: continued |
| 61 Expect.equals(f.fun<Z>(z), "FZ"); //# 06: continued | 61 Expect.equals(f.fun<Z>(z), "FZ"); //# 06: continued |
| 62 } | 62 } |
| OLD | NEW |