diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2024-10-03 21:09:40 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2024-10-03 21:09:40 +0200 |
| commit | 4b8678b8f6b54e3c8dbbbd943228e6b9c919f330 (patch) | |
| tree | 2ff883720f8a12ebc92f3b55519b9074be839e33 /tests | |
| parent | 28982c543bf43eb3378cc47b7aa33c405f7bc6b2 (diff) | |
Make sure variables aren't spilled in case clauses
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin index cac4285..b695732 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -2955,3 +2955,21 @@ ast_raw_data_slice_2 :: proc(t: ^testing.T) { test.expect_completion_details(t, &source, "", {"test.rezz: [^]int"}) } + +@(test) +ast_switch_completion_multiple_cases :: proc(t: ^testing.T) { + source := test.Source { + main = `package main + main :: proc() { + switch { + case true: + foozz: int + case false: + fooz{*} + } + } + `, + } + + test.expect_completion_details(t, &source, "", {}) +} |