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 class A { | 5 class A { |
6 A(); | 6 A(); |
7 A.foo(); | 7 A.foo(); |
8 } | 8 } |
9 | 9 |
10 class B extends A { | 10 class B extends A { |
11 B.c1() | 11 B.c1() |
12 : super.foo | 12 : super.foo |
13 /* // //# 01: compile-time error | 13 /* //# 01: compile-time error |
14 () | 14 () |
15 */ // //# 01: continued | 15 */ //# 01: continued |
16 ; | 16 ; |
17 | 17 |
18 B.foo(); | 18 B.foo(); |
19 B.c2() | 19 B.c2() |
20 : this.foo | 20 : this.foo |
21 /* // //# 02: compile-time error | 21 /* //# 02: compile-time error |
22 () | 22 () |
23 */ // //# 02: continued | 23 */ //# 02: continued |
24 ; | 24 ; |
25 | 25 |
26 B.c3() | 26 B.c3() |
27 : super | 27 : super |
28 /* // //# 03: compile-time error | 28 /* //# 03: compile-time error |
29 () | 29 () |
30 */ // //# 03: continued | 30 */ //# 03: continued |
31 ; | 31 ; |
32 | 32 |
33 B(); | 33 B(); |
34 B.c4() | 34 B.c4() |
35 : this | 35 : this |
36 /* // //# 04: compile-time error | 36 /* //# 04: compile-time error |
37 () | 37 () |
38 */ // //# 04: continued | 38 */ //# 04: continued |
39 ; | 39 ; |
40 } | 40 } |
41 | 41 |
42 main() { | 42 main() { |
43 new B.c1(); | 43 new B.c1(); |
44 new B.c2(); | 44 new B.c2(); |
45 new B.c3(); | 45 new B.c3(); |
46 new B.c4(); | 46 new B.c4(); |
47 } | 47 } |
OLD | NEW |