Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: scoping of annotation calls, type parameter constraints & yields #561

Merged
merged 6 commits into from
Sep 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: scoping tests for yields
lars-reimann committed Sep 18, 2023
commit ea20cc4cca156777b62c810e922acadef7d9b007
16 changes: 16 additions & 0 deletions tests/resources/scoping/yields/in pipeline/main.sdstest
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package test.scoping.yields.inPipeline

segment mySegment1() -> before: Int {}

pipeline myPipeline {
// $TEST$ unresolved
yield »before« = 1;

// $TEST$ unresolved
yield »after« = 1;

// $TEST$ unresolved
yield »unresolved« = 1;
}

segment mySegment2() -> after: Int {}
22 changes: 22 additions & 0 deletions tests/resources/scoping/yields/in segment/main.sdstest
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package test.scoping.yields.inSegment

segment mySegment1() -> before: Int {}

segment mySegment() -> (
// $TEST$ target result
»result«: Int
) {
// $TEST$ references result
yield »result« = 1;

// $TEST$ unresolved
yield »before« = 1;

// $TEST$ unresolved
yield »after« = 1;

// $TEST$ unresolved
yield »unresolved« = 1;
}

segment mySegment2() -> after: Int {}