97153c68df
Fixes: https://github.com/dart-lang/sdk/issues/61714 Change-Id: I1fba28e87f138c85040a75b742ca1850ef1b7984 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478040 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Auto-Submit: Felipe Morschel <git@fmorschel.dev> Reviewed-by: Paul Berry <paulberry@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
20 lines
496 B
Dart
20 lines
496 B
Dart
// Copyright (c) 2026, 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 static members can be used as constant expressions when
|
|
// prefixed with the library prefix.
|
|
|
|
import '' as self;
|
|
|
|
class A {
|
|
static const int c = 0;
|
|
static int let(int v) => v;
|
|
}
|
|
|
|
void f() {
|
|
const _ = self.A.c;
|
|
const _ = self.A.let;
|
|
const _ = self.A.new;
|
|
}
|