| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 for testing binary operations. | |
| 5 // VMOptions=--verify_implements --check-function-fingerprints | |
| 6 | 4 |
| 7 class BootstrapTest { | 5 var x = 0; |
| 8 | 6 |
| 9 static testMain() { | 7 f(y) { |
| 10 var obj = new Object(); | 8 var z = x; /// 01: compile-time error |
| 11 | 9 if (y) { |
| 12 return obj; | 10 x = x + 1; /// 02: compile-time error |
| 11 print(x); /// 03: compile-time error |
| 13 } | 12 } |
| 14 | 13 var x |
| 14 = x++ /// 04: compile-time error |
| 15 ; |
| 16 print(x); |
| 15 } | 17 } |
| 16 | 18 |
| 17 main() { | 19 main() { |
| 18 BootstrapTest.testMain(); | 20 f(true); |
| 19 } | 21 } |
| OLD | NEW |