-
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.
Closes partially #540. ### Summary of Changes Named arguments now correctly point to their corresponding parameter.
- Loading branch information
1 parent
8d68a42
commit 6b486cd
Showing
16 changed files
with
332 additions
and
7 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
20 changes: 20 additions & 0 deletions
20
tests/resources/scoping/arguments/of annotation calls/to parameter/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,20 @@ | ||
package tests.scoping.arguments.ofAnnotationCalls.toParameter | ||
|
||
annotation MyAnnotation( | ||
// $TEST$ target a | ||
»a«: Int, | ||
// $TEST$ target b | ||
»b«: Int = 0, | ||
// $TEST$ target c | ||
vararg »c«: Int | ||
) | ||
|
||
@MyAnnotation( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
) | ||
pipeline myPipeline {} |
9 changes: 9 additions & 0 deletions
9
...rces/scoping/arguments/of annotation calls/to something other than parameter/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,9 @@ | ||
package tests.scoping.arguments.ofAnnotationCalls.toSomethingOtherThanParameter | ||
|
||
annotation MyAnnotation(a: Int) | ||
|
||
@MyAnnotation( | ||
// $TEST$ unresolved | ||
»MyAnnotation« = 0, | ||
) | ||
pipeline myPipeline {} |
13 changes: 13 additions & 0 deletions
13
tests/resources/scoping/arguments/of annotation calls/unresolved/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,13 @@ | ||
package tests.scoping.arguments.ofAnnotationCalls.unresolved | ||
|
||
annotation MyAnnotation(a: Int) | ||
|
||
@MyAnnotation( | ||
// $TEST$ unresolved | ||
»unresolved« = 0, | ||
) | ||
@Unresolved( | ||
// $TEST$ unresolved | ||
»a« = 0 | ||
) | ||
pipeline myPipeline {} |
31 changes: 31 additions & 0 deletions
31
tests/resources/scoping/arguments/of calls/to parameter of annotation/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,31 @@ | ||
package tests.scoping.arguments.ofCalls.toParameterOfAnnotation | ||
|
||
annotation MyAnnotation( | ||
// $TEST$ target a | ||
»a«: Int, | ||
// $TEST$ target b | ||
»b«: Int = 0, | ||
// $TEST$ target c | ||
vararg »c«: Int | ||
) | ||
|
||
pipeline myPipeline { | ||
MyAnnotation( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
|
||
val alias = MyAnnotation; | ||
alias( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
} |
21 changes: 21 additions & 0 deletions
21
tests/resources/scoping/arguments/of calls/to parameter of block lambda/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,21 @@ | ||
package tests.scoping.arguments.ofCalls.toParameterOfBlockLambda | ||
|
||
pipeline myPipeline { | ||
val myBlockLambda = ( | ||
// $TEST$ target a | ||
»a«: Int, | ||
// $TEST$ target b | ||
»b«: Int = 0, | ||
// $TEST$ target c | ||
vararg »c«: Int | ||
) {}; | ||
|
||
myBlockLambda( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
} |
29 changes: 29 additions & 0 deletions
29
tests/resources/scoping/arguments/of calls/to parameter of callable type/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,29 @@ | ||
package tests.scoping.arguments.ofCalls.toParameterOfCallableType | ||
|
||
segment mySegment(myCallableType: ( | ||
// $TEST$ target a | ||
»a«: Int, | ||
// $TEST$ target b | ||
»b«: Int = 0, | ||
// $TEST$ target c | ||
vararg »c«: Int | ||
) -> ()) { | ||
myCallableType( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
|
||
val alias = myCallableType; | ||
alias( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
} |
31 changes: 31 additions & 0 deletions
31
tests/resources/scoping/arguments/of calls/to parameter of class/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,31 @@ | ||
package tests.scoping.arguments.ofCalls.toParameterOfClass | ||
|
||
class MyClass( | ||
// $TEST$ target a | ||
»a«: Int, | ||
// $TEST$ target b | ||
»b«: Int = 0, | ||
// $TEST$ target c | ||
vararg »c«: Int | ||
) {} | ||
|
||
pipeline myPipeline { | ||
MyClass( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
|
||
val alias = MyClass; | ||
alias( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
} |
34 changes: 34 additions & 0 deletions
34
tests/resources/scoping/arguments/of calls/to parameter of enum variant/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,34 @@ | ||
package tests.scoping.arguments.ofCalls.toParameterOfEnumVariant | ||
|
||
enum MyEnum { | ||
MyEnumVariant( | ||
// $TEST$ target a | ||
»a«: Int, | ||
// $TEST$ target b | ||
»b«: Int = 0, | ||
// $TEST$ target c | ||
vararg »c«: Int | ||
) | ||
} | ||
|
||
|
||
pipeline myPipeline { | ||
MyEnum.MyEnumVariant( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
|
||
val alias = MyEnum.MyEnumVariant; | ||
alias( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
} |
21 changes: 21 additions & 0 deletions
21
tests/resources/scoping/arguments/of calls/to parameter of expression lambda/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,21 @@ | ||
package tests.scoping.arguments.ofCalls.toParameterOfExpressionLambda | ||
|
||
pipeline myPipeline { | ||
val myExpressionLambda = ( | ||
// $TEST$ target a | ||
»a«: Int, | ||
// $TEST$ target b | ||
»b«: Int = 0, | ||
// $TEST$ target c | ||
vararg »c«: Int | ||
) -> 1; | ||
|
||
myExpressionLambda( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
} |
31 changes: 31 additions & 0 deletions
31
tests/resources/scoping/arguments/of calls/to parameter of function/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,31 @@ | ||
package tests.scoping.arguments.ofCalls.toParameterOfFunction | ||
|
||
fun myFunction( | ||
// $TEST$ target a | ||
»a«: Int, | ||
// $TEST$ target b | ||
»b«: Int = 0, | ||
// $TEST$ target c | ||
vararg »c«: Int | ||
) | ||
|
||
pipeline myPipeline { | ||
myFunction( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
|
||
val alias = myFunction; | ||
alias( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
} |
31 changes: 31 additions & 0 deletions
31
tests/resources/scoping/arguments/of calls/to parameter of segment/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,31 @@ | ||
package tests.scoping.arguments.ofCalls.toParameterOfSegment | ||
|
||
segment mySegment( | ||
// $TEST$ target a | ||
»a«: Int, | ||
// $TEST$ target b | ||
»b«: Int = 0, | ||
// $TEST$ target c | ||
vararg »c«: Int | ||
) {} | ||
|
||
pipeline myPipeline { | ||
mySegment( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
|
||
val alias = mySegment; | ||
alias( | ||
// $TEST$ references c | ||
»c« = 0, | ||
// $TEST$ references a | ||
»a« = 0, | ||
// $TEST$ references b | ||
»b« = 0 | ||
); | ||
} |
Oops, something went wrong.