mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:30:32 +00:00
9d76737487
This flag is unused and the behavior it enables was only useful along with `dart:mirrors`. - Remove the flag and the field on the options object. - Prune code branches that are no longer reachable. - Remove or inline some functions that became either empty or trivially small. - Remove the manual check for a `dart:mirrors` import since this is handled by the CFE now. - Remove references to the flag in tests. - Remove test files which only existed to enable the flag for other tests. Change-Id: I21bf594271fb4eeb5b73fcbf07da736e9e8d1f33 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138018 Reviewed-by: Nicholas Shahan <nshahan@google.com> Commit-Queue: Nate Bosch <nbosch@google.com> Auto-Submit: Nate Bosch <nbosch@google.com>
27 lines
707 B
Dart
27 lines
707 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.
|
|
|
|
library test.metadata_constructed_constant_test;
|
|
|
|
import 'dart:mirrors';
|
|
|
|
import 'package:expect/expect.dart';
|
|
|
|
class ConstructedConstant {
|
|
final value;
|
|
const ConstructedConstant(this.value);
|
|
toString() => 'ConstructedConstant($value)';
|
|
}
|
|
|
|
class Foo {
|
|
@ConstructedConstant(StateError)
|
|
m() {}
|
|
}
|
|
|
|
main() {
|
|
var m = reflectClass(Foo).declarations[#m] as MethodMirror;
|
|
var value = m.metadata.single.reflectee;
|
|
Expect.stringEquals('ConstructedConstant($StateError)', '$value');
|
|
}
|