diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-17 08:35:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-17 08:35:49 -0400 |
| commit | 447384838549d4f4e68db9cc229ae7f4eb232c4e (patch) | |
| tree | 05f6a69736343d24288c7847361680dcc52b0011 /tests/hover_test.odin | |
| parent | 379c55200570277d68a78006844cd32b1802f328 (diff) | |
| parent | 2d7c8bedac7d3e4780a8507a8b00b6dea254cd0d (diff) | |
Merge pull request #1023 from BradLewis/fix/ternary-if-call-expr
Correctly resolve local if and when ternary expressions
Diffstat (limited to 'tests/hover_test.odin')
| -rw-r--r-- | tests/hover_test.odin | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 402e38a..071bcba 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -4821,6 +4821,19 @@ ast_hover_enum_implicit_if_statement :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.Foo: .A") } + +@(test) +ast_hover_if_ternary_expr :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + main :: proc() { + foo: []int + ba{*}r := len(foo) if true else 2 + } + `, + } + test.expect_hover(t, &source, "test.bar: int") +} /* Waiting for odin fix |