-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove unneeded entries from union types
- Loading branch information
1 parent
6c5100b
commit 3ff542d
Showing
4 changed files
with
86 additions
and
4 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
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
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
53 changes: 53 additions & 0 deletions
53
...sts/resources/typing/simplification/remove unneeded entries from union types/main.sdstest
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package tests.typing.simplification.removeUnneededEntriesFromUnionTypes | ||
|
||
class C( | ||
// $TEST$ serialization Int | ||
p1: »union<Int, Int>«, | ||
|
||
// $TEST$ serialization union<Int, String> | ||
p2: »union<Int, String, Int>«, | ||
|
||
|
||
// $TEST$ serialization Number | ||
p3: »union<Int, Number>«, | ||
|
||
// $TEST$ serialization Number | ||
p4: »union<Number, Int>«, | ||
|
||
// $TEST$ serialization Number? | ||
p5: »union<Number, Int?>«, | ||
|
||
// $TEST$ serialization Any | ||
p6: »union<Int, Number, Any>«, | ||
|
||
// $TEST$ serialization Any | ||
p7: »union<Any, Number, Int>«, | ||
|
||
// $TEST$ serialization Any? | ||
p8: »union<Int, Number?, Any>«, | ||
|
||
|
||
// $TEST$ serialization union<Int, String> | ||
p9: »union<Int, String>«, | ||
|
||
// $TEST$ serialization union<Int, String?> | ||
p10: »union<Int, String?>«, | ||
|
||
// $TEST$ serialization union<Number, String> | ||
p11: »union<Int, Number, String>«, | ||
|
||
// $TEST$ serialization union<Number, String> | ||
p12: »union<Number, Int, String>«, | ||
|
||
// $TEST$ serialization Any | ||
p13: »union<Int, String, Any>«, | ||
|
||
// $TEST$ serialization Any? | ||
p14: »union<Int, String?, Any>«, | ||
|
||
// $TEST$ serialization Any | ||
p15: »union<Any, String, Int>«, | ||
|
||
// $TEST$ serialization Any? | ||
p16: »union<Any, String?, Int>«, | ||
) |