-
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: error if too many type arguments are provided
- Loading branch information
1 parent
0ccdeaa
commit a268830
Showing
4 changed files
with
42 additions
and
2 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
17 changes: 17 additions & 0 deletions
17
...resources/validation/other/types/type argument lists/too many type arguments/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,17 @@ | ||
package tests.validation.other.types.typeArgumentLists.tooManyTypeArguments | ||
|
||
class MyClass1<T> | ||
class MyClass2<A, B> | ||
|
||
fun myFunction( | ||
// $TEST$ no error r"Expected \d* type arguments? but got \d*\." | ||
f: MyClass1»<>«, | ||
// $TEST$ no error r"Expected \d* type arguments? but got \d*\." | ||
g: MyClass1»<Int>«, | ||
// $TEST$ error "Expected 1 type argument but got 2." | ||
h: MyClass1»<Int, Int>«, | ||
// $TEST$ error "Expected 2 type arguments but got 3." | ||
i: MyClass2»<Int, Int, Int>«, | ||
// $TEST$ no error r"Expected \d* type arguments? but got \d*\." | ||
j: Unresolved»<Int, Int>« | ||
) |