diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-11-17 08:31:00 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-17 08:31:00 +1100 |
| commit | bf2ec00dc58e75ec6224e59172ae3c591c58bb9c (patch) | |
| tree | e26678f19ec0ee3e33ea0abdf928d95ada721118 /tests | |
| parent | b893410bc7ff44a73f4c77d31d7ae5c7defbd9e6 (diff) | |
| parent | 12deb18a07dc28f840555fb6c875d888ab5be13b (diff) | |
Merge pull request #1185 from BradLewis/fix/unary-expr-function-call
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hover_test.odin | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 52dca76..8d5f461 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -5642,6 +5642,39 @@ ast_hover_named_proc_arg_hover :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "foo.bar: f32") } + +@(test) +ast_hover_unary_function_call :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + foo :: proc() -> int {} + + main :: proc() { + b{*}ar := -foo() + } + `, + } + test.expect_hover(t, &source, "test.bar: int") +} + +@(test) +ast_hover_unary_overload_function_call :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + foo_int :: proc() -> int {} + foo_string :: proc(s: string) -> string {} + foo :: proc { + foo_int, + foo_string, + } + + main :: proc() { + b{*}ar := -foo() + } + `, + } + test.expect_hover(t, &source, "test.bar: int") +} /* Waiting for odin fix |