Skip to content

Commit

Permalink
Issue #946: LanguageFeatures/Instantiate-to-bounds/typeef/static/type…
Browse files Browse the repository at this point in the history
…def_FutureOr tests updated according to the recent changes.
  • Loading branch information
iarkh committed Oct 2, 2020
1 parent 5543ed8 commit cfdac8e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,23 @@
// SharedOptions=--enable-experiment=non-nullable

import "dart:async";
import "../../../../Utils/expect.dart";

typedef G<X extends FutureOr<X>> = X Function(X);

main() {
G? source;
// ^^^^^^^
test(G source) {
var fsource = toF(source);
F<G<FutureOr<dynamic>>> target = fsource;

F<G<FutureOr<Null>>> target1 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<FutureOr<Null>>> target2 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,16 @@
// SharedOptions=--enable-experiment=non-nullable

import "dart:async";
import "../../../../Utils/expect.dart";

typedef G<X extends FutureOr<X>> = void Function();

main() {
G? source;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
test(G source) {
var fsource = toF(source);

F<G<FutureOr<dynamic>>> target = fsource;
F<G<FutureOr<Null>>> target1 = fsource;
F<G<FutureOr<Null>>> target2 = fsource;
}

main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,18 @@ import "dart:async";

typedef G<X extends FutureOr<X>> = void Function<X1 extends X>();

main() {
G? source;
void Function<X extends FutureOr<dynamic>>()? target = source;
test(G source) {
void Function<X extends FutureOr<dynamic>>() target1 = source;

void Function<X extends FutureOr<Never>>() target2 = source;
// ^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

void Function<X extends FutureOr<Null>>() target3 = source;
// ^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

main() {}

0 comments on commit cfdac8e

Please sign in to comment.