| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // Check that the implicit super call for synthetic constructors are checked. | 5 // Check that the implicit super call for synthetic constructors are checked. |
| 6 | 6 |
| 7 | |
| 8 class A { | 7 class A { |
| 9 final x; | 8 final x; |
| 10 A(this.x); | 9 A(this.x); |
| 11 } | 10 } |
| 12 | 11 |
| 13 class B extends A { | 12 class B extends A { |
| 14 /* // //# 00: compile-time error | 13 /* // //# 00: compile-time error |
| 15 B() : super(null); | 14 B() : super(null); |
| 16 */ // //# 00: continued | 15 */ // //# 00: continued |
| 17 } | 16 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 29 } | 28 } |
| 30 | 29 |
| 31 // ============== | 30 // ============== |
| 32 | 31 |
| 33 class G extends A { | 32 class G extends A { |
| 34 /* // //# 02: compile-time error | 33 /* // //# 02: compile-time error |
| 35 G() : super(null); | 34 G() : super(null); |
| 36 */ // //# 02: continued | 35 */ // //# 02: continued |
| 37 } | 36 } |
| 38 | 37 |
| 39 class H extends G { | 38 class H extends G {} |
| 40 } | |
| 41 | 39 |
| 42 main() { | 40 main() { |
| 43 new B().x; | 41 new B().x; |
| 44 new Z().x; | 42 new Z().x; |
| 45 new H().x; | 43 new H().x; |
| 46 } | 44 } |
| OLD | NEW |