Skip to content

Commit 85f6c01

Browse files
munificentcommit-bot@chromium.org
authored andcommitted
Migrate language_2/subtyping_static to NNBD.
Change-Id: I94ea79417ae39f64f558d55489000d720c3191e1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151092 Auto-Submit: Bob Nystrom <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]> Reviewed-by: Nicholas Shahan <[email protected]>
1 parent f2fafcd commit 85f6c01

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Feature tests for static analysis involving subtyping
2+
3+
This directory was created in order to hold tests pertaining to the
4+
static analysis of Dart where it involves subtyping.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
import 'dart:async';
6+
import 'package:expect/expect.dart';
7+
8+
class A implements Future<Future<A>> {
9+
@override
10+
noSuchMethod(Invocation _) {}
11+
}
12+
13+
void main() {
14+
Expect.notSubtype<A, Future<A>>();
15+
Expect.subtype<FutureOr<A>, FutureOr<Future<A>>>();
16+
}

0 commit comments

Comments
 (0)