dart-sdk/tests/language/deferred_constraints_lib.dart
sigurdm@google.com 26387eca98 Constrain constant references from deferred libraries
Now any reference to a constant from a deferred library in a constant context will give an static error.

Also fixed the const-new expression constraint so it works with named constructors.

Split the deferred_constraints_test into deferred_constraints_type_annotation_test and deferred_constraints_constants_test

R=floitsch@google.com

Review URL: https://codereview.chromium.org//195983006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33734 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 09:13:30 +00:00

17 lines
428 B
Dart

// Copyright (c) 2014, 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.
class C {
static int staticMethod() => 42;
}
class G<T> {}
class Const {
const Const();
const Const.otherConstructor();
static const instance = const Const();
}
const constantInstance = const Const();