Migrate language_2/subtyping_static to NNBD.

Change-Id: I94ea79417ae39f64f558d55489000d720c3191e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151092
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
Robert Nystrom 2020-06-15 20:53:55 +00:00 committed by commit-bot@chromium.org
parent f2fafcd440
commit 85f6c01fc4
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,4 @@
# Feature tests for static analysis involving subtyping
This directory was created in order to hold tests pertaining to the
static analysis of Dart where it involves subtyping.

View file

@ -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>>>();
}