diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-07 22:34:43 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-07 22:34:43 -0400 |
| commit | fd12714250f96b8dbdb65825ac8b265edbe3bd10 (patch) | |
| tree | dea664ed82d7f5671adaf28203165aa7689ef227 /tests | |
| parent | a3ebb67fd1893881a7e88021341f712461fc3a79 (diff) | |
Proc named returns should not be marked as parameters
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/semantic_tokens_test.odin | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/semantic_tokens_test.odin b/tests/semantic_tokens_test.odin index 35714df..8fd8468 100644 --- a/tests/semantic_tokens_test.odin +++ b/tests/semantic_tokens_test.odin @@ -102,3 +102,22 @@ semantic_tokens_struct_fields :: proc(t: ^testing.T) { {0, 4, 3, .Property, {}}, // [7] bar }) } + +@(test) +semantic_tokens_proc_return :: proc(t: ^testing.T) { + src := test.Source { + main = `package test + foo :: proc() -> (ret: int) { + ret += 1 + return + } + ` + } + + test.expect_semantic_tokens(t, &src, { + {1, 2, 3, .Function, {.ReadOnly}}, // [0] foo + {0, 18, 3, .Variable, {}}, // [1] ret + {0, 5, 3, .Type, {.ReadOnly}}, // [2] proc + {1, 3, 3, .Variable, {}}, // [3] ret + }) +} |