OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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"; | |
6 | |
7 class A { | 5 class A { |
8 foo() { return 499; } | 6 foo() { return 499; } |
9 bar(x) { return x + 499; } | 7 bar(x) { return x + 499; } |
10 baz() { return 54; } | 8 baz() { return 54; } |
11 titi() { return 123; } | 9 titi() { return 123; } |
12 } | 10 } |
13 | 11 |
14 class B { | 12 class B { |
15 foo() { return 42; } | 13 foo() { return 42; } |
16 bar(x) { return x + 42; } | 14 bar(x) { return x + 42; } |
(...skipping 18 matching lines...) Expand all Loading... |
35 | 33 |
36 Expect.equals(54, a.baz()); | 34 Expect.equals(54, a.baz()); |
37 Expect.equals(54, c.baz()); | 35 Expect.equals(54, c.baz()); |
38 | 36 |
39 // We don't call a.titi. This means that the compiler needs to trigger the | 37 // We don't call a.titi. This means that the compiler needs to trigger the |
40 // compilation of A.titi by going through the super-chain. | 38 // compilation of A.titi by going through the super-chain. |
41 Expect.equals(123, c.titi()); | 39 Expect.equals(123, c.titi()); |
42 | 40 |
43 Expect.equals(84, b.toto()); | 41 Expect.equals(84, b.toto()); |
44 } | 42 } |
OLD | NEW |