aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-01 07:48:22 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-01 07:48:22 -0400
commit16cfd6fff822faf8116d8648effe171154fa6bc2 (patch)
treea14e155110992951c07c72254a27995299e69cdd /tests
parent24b81b6118ce76eb38e2fd33642464e3a7f2063e (diff)
Handle multiple returns
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 53e2964..93aae1f 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -3392,6 +3392,34 @@ ast_hover_returned_proc_call_parameter :: proc(t: ^testing.T) {
"test.a: bool",
)
}
+
+@(test)
+ast_hover_returned_proc_call_parameter_multiple_return :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ Foo :: struct {
+ someData: int,
+ }
+
+ main :: proc() {
+ a, b{*} := foo()({})
+ }
+
+ foo :: proc() -> proc(data: Foo) -> (int, bool) {
+ return 1, bar
+ }
+
+ bar :: proc(data: Foo) -> bool {
+ return false
+ }
+ `,
+ }
+ test.expect_hover(
+ t,
+ &source,
+ "test.b: bool",
+ )
+}
/*
Waiting for odin fix