diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-11-17 21:59:32 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-17 21:59:32 +1100 |
| commit | 74396f71ea35e313e6b2585db913e69cca14146e (patch) | |
| tree | 17028b3fdec6cbe15b00cebc97047d116fe4516e /tests | |
| parent | 161ce3ea1419517da6f7752acba9e4d02f2c4d4b (diff) | |
| parent | 2c192f7b69b89d4d7dc3367fe5a736c858643129 (diff) | |
Merge pull request #1189 from BradLewis/fix/unary-expr-function-call
Fix/unary expr function call
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hover_test.odin | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 8d5f461..282ffb7 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -5675,6 +5675,34 @@ ast_hover_unary_overload_function_call :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.bar: int") } + +@(test) +ast_hover_negate_function_call :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + foo :: proc() -> bool {} + + main :: proc() { + b{*}ar := !foo() + } + `, + } + test.expect_hover(t, &source, "test.bar: bool") +} + +@(test) +ast_hover_function_call_with_parens :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + foo :: proc() -> bool {} + + main :: proc() { + b{*}ar := (foo()) + } + `, + } + test.expect_hover(t, &source, "test.bar: bool") +} /* Waiting for odin fix |