mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 09:43:57 +00:00
Add test demonstrating that FutureOr<A> <: FutureOr<B> =/=> A <: B.
Change-Id: Iedc60b57f80e77784e54b8d5ed9076c5016edd2f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121653 Commit-Queue: Mayank Patke <fishythefish@google.com> Reviewed-by: Leaf Petersen <leafp@google.com>
This commit is contained in:
parent
a73eba9823
commit
2baf675742
|
@ -0,0 +1,16 @@
|
|||
// Copyright (c) 2019, 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';
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
class A implements Future<Future<A>> {
|
||||
@override
|
||||
noSuchMethod(Invocation _) {}
|
||||
}
|
||||
|
||||
void main() {
|
||||
Expect.notSubtype<A, Future<A>>();
|
||||
Expect.subtype<FutureOr<A>, FutureOr<Future<A>>>();
|
||||
}
|
Loading…
Reference in a new issue