mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:27:17 +00:00
43cff26365
TEST= language/enum/enum_test Change-Id: I83b7fd1c29103c3aa4dc7ad3e41141fb8c62339e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203564 Commit-Queue: Lasse R.H. Nielsen <lrn@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
16 lines
401 B
Dart
16 lines
401 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.
|
|
|
|
enum E1 { a, b }
|
|
enum E2 { a, b }
|
|
enum E3 { a, b }
|
|
|
|
var v = [E1.a, E2.b];
|
|
|
|
main() {
|
|
// Test that v is `List<Enum>`, so these assignments are OK.
|
|
v[0] = E3.a;
|
|
List<Enum> w = v;
|
|
}
|