From 2d7c8bedac7d3e4780a8507a8b00b6dea254cd0d Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Wed, 17 Sep 2025 08:26:07 -0400 Subject: Correctly resolve local if and when ternary expressions --- tests/hover_test.odin | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') 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 -- cgit v1.2.3