Skip to content

Commit

Permalink
Fixes #946: LanguageFeatures/Instantiate-to-bounds/typedef/static/typ…
Browse files Browse the repository at this point in the history
…edef_l2_06_* tests updated according to the recent SDK changes.
  • Loading branch information
iarkh committed Oct 8, 2020
1 parent 4d2380c commit bb3f13a
Show file tree
Hide file tree
Showing 24 changed files with 1,358 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
import "../../../../Utils/expect.dart";

class A<X> {}
typedef G<X extends Y, Y extends A<X>> = void Function(X);
typedef G_expected = void Function(Never);
typedef G<X extends A<Y>, Y extends A<X>> = void Function(X);
typedef G_expected = void Function(A<Never>);

main() {
Expect.equals(G_expected, G);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
// SharedOptions=--enable-experiment=non-nullable

class A<X> {}
typedef G<X extends Y, Y extends A<X>> =
void Function<X1 extends X, Y1 extends Y>(X);
typedef G<X extends Y, Y extends A<X>> = void Function<X1 extends X, Y1 extends Y>(X);

test(G source) {
void Function<X extends A<dynamic>, Y extends A<dynamic>>(A<dynamic>) target1 = source;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
// SharedOptions=--enable-experiment=non-nullable

class A<X> {}
typedef G<X extends Y, Y extends A<X>> =
void Function<X1 extends X, Y1 extends Y>(Y);
typedef G<X extends Y, Y extends A<X>> = void Function<X1 extends X, Y1 extends Y>(Y);

test(G source) {
void Function<X extends A<dynamic>, Y extends A<dynamic>>(A<dynamic>) target1 = source;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
class A<X> {}
typedef G<X extends Y, Y extends A<X>> = void Function<Y1 extends Y>(X);


void test(G source) {
void Function<X extends dynamic>(A<Never>) target = source;
// ^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,16 @@
* with two related parameters: [typedef G<X extends Y, Y extends A<X>> =
* void Function()]
*
* @Issue 41963, 41964
* @Issue 41963, 41964, 43724
*
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable

class A<X> {}
typedef G<X extends Y, Y extends A<X>> = void Function();

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

class A<X> {}
typedef G<X extends A<Y>, Y extends X> = void Function();
typedef G<X extends Y, Y extends A<X>> = void Function();

test(G source) {
var fsource = toF(source);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,85 @@
*/
// SharedOptions=--enable-experiment=non-nullable

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

class A<X> {}
typedef G<X extends A<Y>, Y extends A<X>> = X Function(Y);

main() {
G? source;
// ^^^^^^
test(G source) {
var fsource = toF(source);

F<G<A<dynamic>, A<Never>>> target0 = fsource;

F<G<A<dynamic>, A<dynamic>>> target1 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Never>, A<dynamic>>> target2 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Never>, A<Never>>> target3 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<dynamic>, A<Null>>> target4 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Null>, A<dynamic>>> target5 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Null>, A<Null>>> target6 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<dynamic, Never>> target7 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<dynamic, dynamic>> target8 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<Never, dynamic>> target9 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<Never, Never>> target10 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<dynamic, A<Never>>> target11 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<dynamic, A<dynamic>>> target12 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<Never, A<dynamic>>> target13 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<Never, A<Never>>> target14 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

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

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

class A<X> {}
typedef G<X extends A<Y>, Y extends A<X>> = Y Function(X);

main() {
G? source;
// ^^^^^^
test(G source) {
var fsource = toF(source);

F<G<A<dynamic>, A<Never>>> target0 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<dynamic>, A<dynamic>>> target1 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Never>, A<dynamic>>> target2 = fsource;

F<G<A<Never>, A<Never>>> target3 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<dynamic>, A<Null>>> target4 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Null>, A<dynamic>>> target5 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Null>, A<Null>>> target6 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<dynamic, Never>> target7 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<dynamic, dynamic>> target8 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<Never, dynamic>> target9 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<Never, Never>> target10 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<dynamic, A<Never>>> target11 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<dynamic, A<dynamic>>> target12 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<Never, A<dynamic>>> target13 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<Never, A<Never>>> target14 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Never>, dynamic>> target15 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Never>, Never>> target16 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

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

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

class A<X> {}
typedef G<X extends A<Y>, Y extends A<X>> = X Function(X, Y);

main() {
G? source;
// ^^^^^^
test(G source) {
var fsource = toF(source);

F<G<A<dynamic>, Never>> target = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

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

F<G<A<dynamic>, dynamic>> target2 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<dynamic>, A<dynamic>>> target3 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<dynamic>, A<Never>>> target4 = fsource;

F<G<A<Never>, A<dynamic>>> target5 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Never>, A<Never>>> target6 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<dynamic>, A<Null>>> target7 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Null>, A<dynamic>>> target8 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<A<Null>, A<Null>>> target9 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<dynamic, A<dynamic>>> target10 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<dynamic, A<Never>>> target11 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<dynamic, A<Null>>> target12 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<Never, A<dynamic>>> target13 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<Never, A<Never>>> target14 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

F<G<Never, A<Null>>> target15 = fsource;
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

main() {}
Loading

0 comments on commit bb3f13a

Please sign in to comment.