diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-10-27 13:21:00 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-10-27 13:21:00 +0200 |
| commit | 7415292f695102c94b6d97e8a28ffc99da71ac30 (patch) | |
| tree | bb9af9e309ea07d81067cef1cd7b69f8af0ab184 /tests | |
| parent | 2cf49d9cda4ec5ab480d71da3da37ee2b71fc6f4 (diff) | |
Handle typeid as a type
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 77e1913..46364ff 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -1929,3 +1929,21 @@ ast_union_with_type_from_different_package :: proc(t: ^testing.T) { test.expect_completion_labels(t, &source, ".", {"(my_package.My_Int)"}) } + +@(test) +ast_completion_union_with_typeid :: proc(t: ^testing.T) { + source := test.Source { + main = `package main + import "my_package" + + Maybe :: union($T: typeid) {T} + + main :: proc() { + my_maybe: Maybe(typeid) + my_maybe.* + } + `, + } + + test.expect_completion_labels(t, &source, ".", {"(typeid)"}) +} |