| 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 metadata on a class 'Super' using subtypes of 'Super' are not | 5 // Check that metadata on a class 'Super' using subtypes of 'Super' are not |
| 6 // considered as cyclic inheritance or lead to crashes. | 6 // considered as cyclic inheritance or lead to crashes. |
| 7 | 7 |
| 8 @Sub1(0) //# 01: ok | 8 @Sub1(0) //# 01: ok |
| 9 class Super { | 9 class Super { |
| 10 final field; | 10 final field; |
| 11 @Sub2(1) //# 02: ok | 11 @Sub2(1) //# 02: ok |
| 12 const Super(this.field); | 12 const Super(this.field); |
| 13 } | 13 } |
| 14 | 14 |
| 15 class Sub1 extends Super { | 15 class Sub1 extends Super { |
| 16 const Sub1(var field) : super(field); | 16 const Sub1(var field) : super(field); |
| 17 } | 17 } |
| 18 | 18 |
| 19 class Sub2 extends Super { | 19 class Sub2 extends Super { |
| 20 const Sub2(var field) : super(field); | 20 const Sub2(var field) : super(field); |
| 21 } | 21 } |
| 22 | 22 |
| 23 void main() { | 23 void main() { |
| 24 print(new Super(1)); | 24 print(new Super(1)); |
| 25 } | 25 } |
| OLD | NEW |