Skip to content

Commit

Permalink
Issue #1094: Recent master changes merged into pre-nnbd branch, missi…
Browse files Browse the repository at this point in the history
…ng Iuuse tags added,test corrected (Language/Generics).
  • Loading branch information
iarkh committed Jun 28, 2021
1 parent dc3122c commit 027e091
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 14 deletions.
12 changes: 12 additions & 0 deletions Language/Generics/Superbounded_types/class_A03_t03.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,21 @@
class A<X> {
A() {}
factory A.foo1() = C<Null>;

factory A.foo2() = C<A<Null>>;
// ^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

factory A.foo3() = C<A<A<Null>>>;
// ^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

factory A.foo4() = C<A<A<A<Null>>>>;
// ^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

}

Expand Down
12 changes: 12 additions & 0 deletions Language/Generics/Superbounded_types/class_A03_t06.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,21 @@
class A<X extends A<X>> {
A() {}
factory A.foo1() = C<Null>;

factory A.foo2() = C<A<Null>>;
// ^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

factory A.foo3() = C<A<A<Null>>>;
// ^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

factory A.foo4() = C<A<A<A<Null>>>>;
// ^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

}

Expand Down
61 changes: 50 additions & 11 deletions Language/Generics/Superbounded_types/function_A01_t06.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,58 @@ class A<X extends A<X>> {}
void testme<X extends Y, Y extends A<X>>() {}

main() {
testme(); //# 01: compile-time error
testme();
//^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

testme<Null, dynamic>(); //# 02: compile-time error
testme<dynamic, Null>(); //# 03: compile-time error
testme<dynamic, dynamic>(); //# 04: compile-time error
testme<Null, dynamic>();
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

testme<Null, Object>(); //# 05: compile-time error
testme<Object, Null>(); //# 06: compile-time error
testme<Object, Object>(); //# 07: compile-time error
testme<dynamic, Null>();
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

testme<Null, void>(); //# 08: compile-time error
testme<void, Null>(); //# 09: compile-time error
testme<void, void>(); //# 10: compile-time error
testme<dynamic, dynamic>();
// ^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

testme<A<Null>, Null>(); //# 11: compile-time error
testme<Null, Object>();
// ^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

testme<Object, Null>();
// ^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

testme<Object, Object>();
// ^^^^^^
// [analyzer] unspecified
// [cfe] unspecified

testme<Null, void>();
// ^^^^
// [analyzer] unspecified
// [cfe] unspecified

testme<void, Null>();
// ^^^^
// [analyzer] unspecified
// [cfe] unspecified

testme<void, void>();
// ^^^^
// [analyzer] unspecified
// [cfe] unspecified

testme<A<Null>, Null>();
// ^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}
1 change: 1 addition & 0 deletions Language/Generics/Superbounded_types/typedef1_A01_t03.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/// compile-time error.
/// @description Checks that compile error is not thrown when function alias with
/// well bounded type parameter is declared
/// @Issue 46483
/// @author [email protected]

Expand Down
1 change: 1 addition & 0 deletions Language/Generics/Superbounded_types/typedef1_A01_t04.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/// compile-time error.
/// @description Checks that compile error is thrown when function alias with
/// type parameters which are not bounded well.
/// @Issue 46483
/// @author [email protected]

Expand Down
1 change: 1 addition & 0 deletions Language/Generics/Superbounded_types/typedef2_A01_t04.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/// compile-time error.
/// @description Checks that compile error is thrown when function alias with
/// type parameters which are not bounded well.
/// @Issue 46483
/// @author [email protected]

Expand Down
2 changes: 1 addition & 1 deletion Language/Generics/typedef_A08_t02.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/// type id<T1, . . . , Tl> in a location where [id] denotes [D]. ... It is a
/// compile-time error if [U] is not well-bounded
/// @description Checks that compile error is thrown if [U] is not well-bounded.
/// @Issue 36959
/// @Issue 36959, 46483
/// @author [email protected]

Expand Down
2 changes: 1 addition & 1 deletion Language/Generics/typedef_A08_t03.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/// type id<T1, . . . , Tl> in a location where [id] denotes [D]. ... It is a
/// compile-time error if [U] is not well-bounded
/// @description Checks that compile error is thrown if [U] is not well-bounded.
/// @Issue 36959
/// @Issue 36959, 46483
/// @author [email protected]

Expand Down
2 changes: 1 addition & 1 deletion Language/Generics/typedef_A08_t04.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/// type id<T1, . . . , Tl> in a location where [id] denotes [D]. ... It is a
/// compile-time error if [U] is not well-bounded
/// @description Checks that compile error is thrown if [U] is not well-bounded.
/// @Issue 36959
/// @Issue 36959, 46483
/// @author [email protected]

Expand Down

0 comments on commit 027e091

Please sign in to comment.