aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-22 22:01:27 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-22 22:06:25 -0400
commit767c312cb90235c3160e5179adc12b47c06eb5a0 (patch)
tree017889afc455ecdda27d396813432e30b444b148 /tests
parentcceb115d109c6fc86d8f6aa9cbe19517437e1519 (diff)
Handle resolving proc overloads with nil passed as a call parameter
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 9d65d8c..b2af26a 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -5028,6 +5028,27 @@ ast_hover_proc_overload_basic_type_alias :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.foo :: proc(i: int)")
}
+
+@(test)
+ast_hover_proc_overload_nil_pointer :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ import "my_package"
+
+ foo_int :: proc(i: int) {}
+ foo_ptr :: proc(s: ^string) {}
+ foo :: proc {
+ foo_int,
+ foo_ptr,
+ }
+
+ main :: proc() {
+ f{*}oo(nil)
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.foo :: proc(s: ^string)")
+}
/*
Waiting for odin fix