Files
sdk/pkg/front_end/testcases/annotation_on_enum_values.dart
T
Dmitry Stefantsov 7dc4fbf5a2 [fasta] Add support for annotations on enum values
Fixes #33083

Bug: https://github.com/dart-lang/sdk/issues/33083
Change-Id: If278ee3c59489944e2e821ae48ba3cb363dbbdd1
Reviewed-on: https://dart-review.googlesource.com/56496
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-05-29 10:41:55 +00:00

22 lines
458 B
Dart

// Copyright (c) 2018, 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.
// This test checks that annotations on enum values are preserved by the
// compiler.
const int hest = 42;
class Fisk<T> {
final T x;
const Fisk.fisk(this.x);
}
enum Foo {
@hest bar,
@Fisk.fisk(hest) baz,
cafebabe,
}
main() {}