| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 | 6 |
| 7 main() { | 7 main() { |
| 8 const f0 = 42; | 8 const f0 = 42; |
| 9 const f1; //# 01: compile-time error | 9 const f1; //# 01: compile-time error |
| 10 const int f2 = 87; | 10 const int f2 = 87; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 // Check that sub-expressions of binary + are numeric. | 80 // Check that sub-expressions of binary + are numeric. |
| 81 const B0 = 42; | 81 const B0 = 42; |
| 82 const B1 = "Hello"; | 82 const B1 = "Hello"; |
| 83 const B2 = "$B1 $B0"; | 83 const B2 = "$B1 $B0"; |
| 84 const B3 = B0 + B1; //# 10: continued | 84 const B3 = B0 + B1; //# 10: continued |
| 85 | 85 |
| 86 // Check identical. | 86 // Check identical. |
| 87 | 87 |
| 88 const B4 = identical(1, new Point(1,2)); // //# 12: compile-time error | 88 const B4 = identical(1, new Point(1,2)); // //# 12: compile-time error |
| 89 const B5 = identical(1, const Point(1,2)); | 89 const B5 = identical(1, const Point(1, 2)); |
| OLD | NEW |