summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2026-02-10 19:44:56 +1100
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2026-02-10 19:44:56 +1100
commit1b5e31443062db82337848f112d26ac3a71b80b9 (patch)
tree3ca3d69ba3487db6f40fdcfa46ab424b515cd3ed /tests
parent3e8434dd66c7cbba28cfa3dd5824b26c2ce70b29 (diff)
Correctly resolve parapoly overloaded procs using bitfields
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 5dc6c91..35c2c4f 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -6075,6 +6075,36 @@ ast_hover_poly_proc_passthrough :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.value: int")
}
+
+@(test)
+ast_hover_parapoly_overloaded_proc_with_bitfield :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ Entry :: struct($T, $H: typeid) {
+ handle: H,
+ }
+
+ SmallHandle :: bit_field int {
+ valid: bool | 1,
+ generation: int | 7,
+ index: int | 24,
+ }
+
+ make :: proc {
+ makeEntry,
+ }
+
+ makeEntry :: proc($T: typeid/Entry($D, $H), handle: H) -> (entry: T) {
+ return
+ }
+
+ main :: proc() {
+ e{*}ntry := make(Entry(int, SmallHandle), SmallHandle{})
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.entry: test.Entry(int, SmallHandle)")
+}
/*
Waiting for odin fix