| 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 // Check that initializers of const fields can be declared out of order. | 4 // Check that initializers of const fields can be declared out of order. |
| 5 | 5 |
| 6 import "package:expect/expect.dart"; | |
| 7 | |
| 8 const P = 2 * (O - N); | 6 const P = 2 * (O - N); |
| 9 const N = 1; | 7 const N = 1; |
| 10 const O = 1 + 3; | 8 const O = 1 + 3; |
| 11 | 9 |
| 12 int main() { | 10 int main() { |
| 13 Expect.equals(1, N); | 11 Expect.equals(1, N); |
| 14 Expect.equals(4, O); | 12 Expect.equals(4, O); |
| 15 Expect.equals(6, P); | 13 Expect.equals(6, P); |
| 16 } | 14 } |
| OLD | NEW |