-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
16 changed files
with
101 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,8 @@ | |
* [<U1,m ..., Uk,m>]. | ||
* @description Checks that instantiation to bounds works OK for the class with | ||
* [typedef G<X> = X Function(X)] parameter (invariant case). | ||
* @Issue 44786 | ||
* @Issue dart-lang/language#1133 | ||
* @author [email protected] | ||
*/ | ||
|
||
|
@@ -52,9 +54,8 @@ import "../../../../Utils/expect.dart"; | |
typedef G<X> = X Function(X); | ||
class A<X extends G<A<X>>> {} | ||
|
||
typedef expected = A<A<dynamic> Function(A<dynamic>)>; | ||
|
||
main() { | ||
Expect.equals( | ||
typeOf<A<G<A<dynamic>>>>(), | ||
typeOf<A>() | ||
); | ||
Expect.equals(expected, A); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,8 @@ | |
* [<U1,m ..., Uk,m>]. | ||
* @description Checks that instantiation to bounds works OK for [typedef G<X> = | ||
* Function(X)], [class A<X extends G<A<X, Y>>, Y extends X>] (covariant) | ||
* @Issue 44786 | ||
* @Issue dart-lang/language#1133 | ||
* @author [email protected] | ||
*/ | ||
|
||
|
@@ -52,9 +54,8 @@ import "../../../../Utils/expect.dart"; | |
typedef G<X> = X Function(X); | ||
class A<X extends G<A<X, Y>>, Y extends X> {} | ||
|
||
typedef expected = A<A<dynamic, dynamic> Function(A<dynamic, dynamic>), dynamic>; | ||
|
||
main() { | ||
Expect.equals( | ||
typeOf<A<G<A<dynamic, dynamic>>, dynamic>>(), | ||
typeOf<A>() | ||
); | ||
Expect.equals(expected, A); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,8 @@ | |
* [<U1,m ..., Uk,m>]. | ||
* @description Checks that instantiation to bounds works OK for [typedef G<X> = | ||
* X Function(X)], [class A<X extends G<A<X, Y>>, Y extends X>] (invariant) | ||
* @Issue 44786 | ||
* @Issue dart-lang/language#1133 | ||
* @author [email protected] | ||
*/ | ||
|
||
|
@@ -52,9 +54,9 @@ import "../../../../Utils/expect.dart"; | |
typedef G<X> = X Function(X); | ||
class A<X extends G<A<Y, X>>, Y extends G<A<X, Y>>> {} | ||
|
||
typedef expected = A<A<dynamic, dynamic> Function(A<dynamic, dynamic>), | ||
A<dynamic, dynamic> Function(A<dynamic, dynamic>)>; | ||
|
||
main() { | ||
Expect.equals( | ||
typeOf<A<G<A<dynamic, dynamic>>,G<A<dynamic, dynamic>>>>(), | ||
typeOf<A>() | ||
); | ||
Expect.equals(expected, A); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,83 +44,26 @@ | |
* [<U1,m ..., Uk,m>]. | ||
* @description Checks that instantiation to bounds works OK for [typedef G<X> = | ||
* Function(X)], [class A<X extends G<A<X, Y>>, Y extends X>] (covariant) | ||
* @Issue 41963, 41964 | ||
* | ||
* @Issue 41963, 41964, 44786 | ||
* @Issue dart-lang/language#1133 | ||
* | ||
* @author [email protected] | ||
*/ | ||
import "../../../../Utils/expect.dart"; | ||
|
||
typedef G<X> = X Function(X); | ||
class A<X extends G<A<X>>> {} | ||
|
||
void test(A source) { | ||
var fsource = toF(source); | ||
|
||
F<A<G<A<dynamic>>>> target = fsource; | ||
|
||
F<A<G<A<Never>>>> target0 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<Null>>>> target1 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<dynamic>> target2 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<dynamic>>> target3 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<G<dynamic>>>>> target4 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<G<A<dynamic>>>>>> target5 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<Never>> target6 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<Never>>> target7 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<G<Never>>>>> target8 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<G<A<Never>>>>>> target9 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<Null>> targe10 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<Null>>> target11 = fsource; | ||
// ^^^^^^^ | ||
main() { | ||
A? source; | ||
// ^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
A(); | ||
//^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
} | ||
|
||
main() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,10 @@ | |
* [<U1,m ..., Uk,m>]. | ||
* @description Checks that instantiation to bounds works OK for [typedef G<X> = | ||
* X Function(X)], [class A<X extends G<A<X, Y>>, Y extends X>] | ||
* | ||
* @Issue 44786 | ||
* @Issue dart-lang/language#1133 | ||
* | ||
* @author [email protected] | ||
*/ | ||
|
||
|
@@ -52,54 +56,16 @@ import "../../../../Utils/expect.dart"; | |
typedef G<X> = X Function(X); | ||
class A<X extends G<A<X, Y>>, Y extends X> {} | ||
|
||
test(A source) { | ||
var fsource = toF(source); | ||
F<A<G<A<dynamic, dynamic>>, dynamic>> target = fsource; | ||
|
||
F<A<dynamic, dynamic>> target1 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<dynamic>, dynamic>> target2 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<G<dynamic>, dynamic>>, dynamic>> target3 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<Never, Never>>, Never>> target4 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<Never, Never>> target5 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<Never>, Never>> target6 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<Never, Never>>, Never>> target7 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<dynamic, Never>>, Never>> target8 = fsource; | ||
// ^^^^^^^ | ||
main() { | ||
A? source; | ||
// ^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
A(); | ||
//^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
} | ||
|
||
main() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,10 @@ | |
* [<U1,m ..., Uk,m>]. | ||
* @description Checks that instantiation to bounds works OK for [typedef G<X> = | ||
* X Function(X)], [class A<X extends G<A<Y, X>>, Y extends G<A<X, Y>>>] | ||
* @Issue 41963, 41964 | ||
* | ||
* @Issue 41963, 41964, 44786 | ||
* @Issue dart-lang/language#1133 | ||
* | ||
* @author [email protected] | ||
*/ | ||
|
||
|
@@ -53,83 +56,16 @@ import "../../../../Utils/expect.dart"; | |
typedef G<X> = X Function(X); | ||
class A<X extends G<A<Y, X>>, Y extends G<A<X, Y>>> {} | ||
|
||
void test(A source) { | ||
var fsource = toF(source); | ||
F<A<G<A<dynamic, dynamic>>, G<A<dynamic, dynamic>>>> target = fsource; | ||
|
||
F<A<dynamic, G<A<dynamic, dynamic>>>> target1 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<dynamic>, G<A<dynamic, dynamic>>>> target2 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<G<dynamic>, dynamic>>, G<A<dynamic, dynamic>>>> target3 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<dynamic, dynamic>>, dynamic>> target4 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<dynamic, dynamic>>, G<dynamic>>> target5 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<Never, Never>>, G<A<Never, Never>>>> target6 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<dynamic, G<A<Never, Never>>>> target7 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<dynamic>, G<A<Never, Never>>>> target8 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
F<A<G<A<G<Never>, Never>>, G<A<Never, Never>>>> target9 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<Never, Never>>, Never>> target10 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<Never, Never>>, G<Never>>> target11 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<Null, Null>>, G<A<Null, Null>>>> target12 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<dynamic, Never>>, G<A<dynamic, Never>>>> target13 = fsource; | ||
// ^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
F<A<G<A<Never, dynamic>>, G<A<Never, dynamic>>>> target14 = fsource; | ||
// ^^^^^^^ | ||
main() { | ||
A? source; | ||
// ^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
} | ||
|
||
main() { | ||
A(); | ||
//^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,10 @@ | |
* [<U1,m ..., Uk,m>]. | ||
* @description Checks that instantiate-to-bounds works correctly for | ||
* [typedef A<X> = X Function(X); typedef G<X extends A<X>> = X Function()] | ||
* | ||
* @Issue 44786 | ||
* @Issue dart-lang/language#1133 | ||
* | ||
* @author [email protected] | ||
*/ | ||
|
||
|
@@ -52,9 +56,8 @@ import "../../../../Utils/expect.dart"; | |
typedef A<X> = X Function(X); | ||
typedef G<X extends A<X>> = X Function(); | ||
|
||
typedef expected = dynamic Function(dynamic) Function(); | ||
|
||
main() { | ||
Expect.equals( | ||
typeOf<G<A<dynamic>>>(), | ||
typeOf<G>() | ||
); | ||
Expect.equals(expected, G); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,10 @@ | |
* [<U1,m ..., Uk,m>]. | ||
* @description Checks that instantiate-to-bounds works correctly for | ||
* [typedef A<X> = X Function(X); typedef G<X extends A<X>> = X Function()] | ||
* | ||
* @Issue 44786 | ||
* @Issue dart-lang/language#1133 | ||
* | ||
* @author [email protected] | ||
*/ | ||
|
||
|
@@ -52,9 +56,8 @@ import "../../../../Utils/expect.dart"; | |
typedef A<X> = X Function(X); | ||
typedef G<X extends A<X>> = void Function(X); | ||
|
||
typedef expected = void Function(dynamic Function(dynamic)); | ||
|
||
main() { | ||
Expect.equals( | ||
typeOf<G<A<dynamic>>>(), | ||
typeOf<G>() | ||
); | ||
Expect.equals(expected, G); | ||
} |
Oops, something went wrong.