| 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 // Regression test for dart2js that used to statically inline the length of an |
| 6 // array held in a variable when it could, even if that variable could |
| 7 // be null. |
| 8 |
| 9 import "package:expect/expect.dart"; |
| 10 |
| 11 var list; |
| 12 |
| 13 main() { |
| 14 if (new DateTime.now().millisecondsSinceEpoch == 0) list = new List(4); |
| 15 Expect.throws(() => print(list[5]), (e) => e is NoSuchMethodError); |
| 16 } |
| OLD | NEW |