File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
tests/language/subtyping_static Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments