Files
sdk/tests/language_2/inference_enum_list_test.dart
T
Konstantin Shcheglov bbe83465ea Test that type of the ListLiteral with two different enums is inferred.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I7b0980008fe58a1b430f989af72fb04c0fb07c8c
Reviewed-on: https://dart-review.googlesource.com/75385
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-19 00:37:59 +00:00

15 lines
384 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 }
var v = [E1.a, E2.b];
main() {
// Test that v is `List<Object>`, so any of these assignemnts are OK.
v[0] = 0;
v[1] = '1';
}