| 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 // Dart test checking that static/instance field shadowing do not conflict. | 4 // Dart test checking that static/instance field shadowing do not conflict. |
| 5 | 5 |
| 6 // Test that certain interfaces/classes are blacklisted from being | 6 // Test that certain interfaces/classes are blacklisted from being |
| 7 // implemented or extended (VM corelib only). | 7 // implemented or extended (VM corelib only). |
| 8 | 8 |
| 9 library BlackListedTest; | 9 library BlackListedTest; |
| 10 | 10 |
| 11 class MyBool extends Bool {} // /// 01: compile-time error | 11 class MyBool extends Bool {} // //# 01: compile-time error |
| 12 | 12 |
| 13 class MyDouble extends Double {} // /// 02: compile-time error | 13 class MyDouble extends Double {} // //# 02: compile-time error |
| 14 | 14 |
| 15 class MyObjectArray extends ObjectArray {} // /// 03: compile-time error | 15 class MyObjectArray extends ObjectArray {} // //# 03: compile-time error |
| 16 | 16 |
| 17 class MyImmutableArray extends ImmutableArray {} // /// 04: compile-time error | 17 class MyImmutableArray extends ImmutableArray {} // //# 04: compile-time error |
| 18 | 18 |
| 19 class MyGrowableObjectArray extends GrowableObjectArray {} // /// 05: compile-ti
me error | 19 class MyGrowableObjectArray extends GrowableObjectArray {} // //# 05: compile-ti
me error |
| 20 | 20 |
| 21 class MyIntegerImplementation extends IntegerImplementation {} // /// 06: compil
e-time error | 21 class MyIntegerImplementation extends IntegerImplementation {} // //# 06: compil
e-time error |
| 22 | 22 |
| 23 class MySmi extends Smi {} // /// 07: compile-time error | 23 class MySmi extends Smi {} // //# 07: compile-time error |
| 24 | 24 |
| 25 class MyMint extends Mint {} // /// 08: compile-time error | 25 class MyMint extends Mint {} // //# 08: compile-time error |
| 26 | 26 |
| 27 class MyBigint extends Bigint {} // /// 09: compile-time error | 27 class MyBigint extends Bigint {} // //# 09: compile-time error |
| 28 | 28 |
| 29 class MyOneByteString extends OneByteString {} // /// 10: compile-time error | 29 class MyOneByteString extends OneByteString {} // //# 10: compile-time error |
| 30 | 30 |
| 31 class MyTwoByteString extends TwoByteString {} // /// 11: compile-time error | 31 class MyTwoByteString extends TwoByteString {} // //# 11: compile-time error |
| 32 | 32 |
| 33 class MyFourByteString extends FourByteString {} // /// 12: compile-time error | 33 class MyFourByteString extends FourByteString {} // //# 12: compile-time error |
| 34 | 34 |
| 35 main() { | 35 main() { |
| 36 new MyBool(); /// 01: continued | 36 new MyBool(); //# 01: continued |
| 37 | 37 |
| 38 new MyDouble(); /// 02: continued | 38 new MyDouble(); //# 02: continued |
| 39 | 39 |
| 40 new MyObjectArray(); /// 03: continued | 40 new MyObjectArray(); //# 03: continued |
| 41 | 41 |
| 42 new MyImmutableArray(); /// 04: continued | 42 new MyImmutableArray(); //# 04: continued |
| 43 | 43 |
| 44 new MyGrowableObjectArray(); /// 05: continued | 44 new MyGrowableObjectArray(); //# 05: continued |
| 45 | 45 |
| 46 new MyIntegerImplementation(); /// 06: continued | 46 new MyIntegerImplementation(); //# 06: continued |
| 47 | 47 |
| 48 new MySmi(); /// 07: continued | 48 new MySmi(); //# 07: continued |
| 49 | 49 |
| 50 new MyMint(); /// 08: continued | 50 new MyMint(); //# 08: continued |
| 51 | 51 |
| 52 new MyBigint(); /// 09: continued | 52 new MyBigint(); //# 09: continued |
| 53 | 53 |
| 54 new MyOneByteString(); /// 10: continued | 54 new MyOneByteString(); //# 10: continued |
| 55 | 55 |
| 56 new MyTwoByteString(); /// 11: continued | 56 new MyTwoByteString(); //# 11: continued |
| 57 | 57 |
| 58 new MyFourByteString(); /// 12: continued | 58 new MyFourByteString(); //# 12: continued |
| 59 } | 59 } |
| OLD | NEW |