dart-sdk/tests/language_2/regress_34482_test.dart
Régis Crelier 30f0026022 [VM runtime] Fix type test: C is a subtype of C<FutureOr> (fixes #34482).
In other words, C<dynamic> <: C<FutureOr<dynamic>>,
because dynamic <: FutureOr<dynamic>.

Add regression test.

Change-Id: I64bcb3b6926143d3176f0afcd1f28d30582309fa
Reviewed-on: https://dart-review.googlesource.com/75400
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-09-19 01:35:40 +00:00

13 lines
346 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.
import 'dart:async';
main() {
Future f = new Future(() => 12345);
Future<FutureOr> f1 = f;
FutureOr fo = f;
f1 = fo;
}