OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
6 | 6 |
7 // Tests codegen of methods reached only via interface implemented by mixin | 7 // Tests codegen of methods reached only via interface implemented by mixin |
8 // application. | 8 // application. |
9 | 9 |
10 class JSIB {} | 10 class JSIB {} |
| 11 |
11 class TD {} | 12 class TD {} |
| 13 |
12 class M { | 14 class M { |
13 foo() => 123; | 15 foo() => 123; |
14 } | 16 } |
| 17 |
15 class I8 extends TD with M implements JSIB {} | 18 class I8 extends TD with M implements JSIB {} |
16 | 19 |
17 use(x) { | 20 use(x) { |
18 if (x is JSIB) { | 21 if (x is JSIB) { |
19 // Should be able to find M.foo since I8 is a subtype of both JSIB and M. | 22 // Should be able to find M.foo since I8 is a subtype of both JSIB and M. |
20 Expect.equals(123, x.foo()); | 23 Expect.equals(123, x.foo()); |
21 } | 24 } |
22 } | 25 } |
23 | 26 |
24 main() { | 27 main() { |
25 (use)(new I8()); | 28 (use)(new I8()); |
26 } | 29 } |
OLD | NEW |