mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 20:51:19 +00:00
26387eca98
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
17 lines
428 B
Dart
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(); |