| 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 // SharedOptions=-Da=true -Db=false -Dc=3 -Dd=STRING | 4 // SharedOptions=-Da=true -Db=false -Dc=3 -Dd=STRING |
| 5 | 5 |
| 6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
| 7 | 7 |
| 8 class Foo {} | 8 class Foo {} |
| 9 | 9 |
| 10 const | 10 const |
| 11 bool // /// 01: ok | 11 bool // //# 01: ok |
| 12 int // /// 02: static type warning, checked mode compile-time error | 12 int // //# 02: static type warning, checked mode compile-time error |
| 13 String // /// 03: static type warning, checked mode compile-time error | 13 String // //# 03: static type warning, checked mode compile-time error |
| 14 Foo // /// 04: static type warning, checked mode compile-time error | 14 Foo // //# 04: static type warning, checked mode compile-time error |
| 15 a = const bool.fromEnvironment('a'); | 15 a = const bool.fromEnvironment('a'); |
| 16 | 16 |
| 17 const | 17 const |
| 18 bool // /// 05: ok | 18 bool // //# 05: ok |
| 19 int // /// 06: static type warning, checked mode compile-time error | 19 int // //# 06: static type warning, checked mode compile-time error |
| 20 String // /// 07: static type warning, checked mode compile-time error | 20 String // //# 07: static type warning, checked mode compile-time error |
| 21 Foo // /// 08: static type warning, checked mode compile-time error | 21 Foo // //# 08: static type warning, checked mode compile-time error |
| 22 b = const bool.fromEnvironment('b'); | 22 b = const bool.fromEnvironment('b'); |
| 23 | 23 |
| 24 const | 24 const |
| 25 bool // /// 09: static type warning, checked mode compile-time error | 25 bool // //# 09: static type warning, checked mode compile-time error |
| 26 int // /// 10: ok | 26 int // //# 10: ok |
| 27 String // /// 11: static type warning, checked mode compile-time error | 27 String // //# 11: static type warning, checked mode compile-time error |
| 28 Foo // /// 12: static type warning, checked mode compile-time error | 28 Foo // //# 12: static type warning, checked mode compile-time error |
| 29 c = const int.fromEnvironment('c'); | 29 c = const int.fromEnvironment('c'); |
| 30 | 30 |
| 31 const | 31 const |
| 32 bool // /// 13: static type warning, checked mode compile-time error | 32 bool // //# 13: static type warning, checked mode compile-time error |
| 33 int // /// 14: static type warning, checked mode compile-time error | 33 int // //# 14: static type warning, checked mode compile-time error |
| 34 String // /// 15: ok | 34 String // //# 15: ok |
| 35 Foo // /// 16: static type warning, checked mode compile-time error | 35 Foo // //# 16: static type warning, checked mode compile-time error |
| 36 d = const String.fromEnvironment('d'); | 36 d = const String.fromEnvironment('d'); |
| 37 | 37 |
| 38 main() { | 38 main() { |
| 39 Expect.equals(a, true); | 39 Expect.equals(a, true); |
| 40 Expect.equals(b, false); | 40 Expect.equals(b, false); |
| 41 Expect.equals(c, 3); | 41 Expect.equals(c, 3); |
| 42 Expect.equals(d, 'STRING'); | 42 Expect.equals(d, 'STRING'); |
| 43 } | 43 } |
| OLD | NEW |