blob: d01c367e45646301a9178ececf71deed15c398ba [file] [log] [blame]
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
// Regression test for dart2js that used to statically inline the length of an
// array held in a variable when it could, even if that variable could
// be null.
import "package:expect/expect.dart";
var list;
main() {
if (new DateTime.now().millisecondsSinceEpoch == 0) list = new List(4);
Expect.throwsNoSuchMethodError(() => print(list[5]));
}