mirror of
https://github.com/dart-lang/sdk
synced 2024-09-20 05:41:37 +00:00
9bee8c6109
Review URL: https://codereview.chromium.org//24680006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27989 260f80e4-7a28-3924-810f-c04153c831b5
17 lines
464 B
Dart
17 lines
464 B
Dart
// 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.
|
|
|
|
// Test that dart2js' optimization on list length does not fold a
|
|
// length getter to a constant if the receiver can be null.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
var a = 42;
|
|
var b;
|
|
|
|
main() {
|
|
Expect.throws(() => b.length);
|
|
b = const [42];
|
|
}
|