| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 import "package:expect/expect.dart"; | |
| 6 | |
| 7 var a; | |
| 8 var b; | |
| 9 | |
| 10 bar() { | |
| 11 a = a == null ? 42 : new Object(); | |
| 12 a += b; | |
| 13 } | |
| 14 | |
| 15 foo() { | |
| 16 a = a == null ? new Object() : 42; | |
| 17 a--; | |
| 18 } | |
| 19 | |
| 20 main() { | |
| 21 for (int i = 0; i < 10; i++) { | |
| 22 a = null; | |
| 23 Expect.throws(foo, (e) => e is NoSuchMethodError); | |
| 24 a = null; | |
| 25 Expect.throws(bar, (e) => e is ArgumentError); | |
| 26 } | |
| 27 } | |
| OLD | NEW |