From 3bf249dc5d684995c9dcbd6045dd0b68595b4b0d Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Sun, 7 Sep 2025 09:54:04 -0400 Subject: Only show cast hover info if hovering over the `cast` keyword --- tests/hover_test.odin | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/hover_test.odin b/tests/hover_test.odin index daff8e4..dea4b3b 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -4431,7 +4431,6 @@ ast_hover_overloaded_proc_slice_dynamic_array :: proc(t: ^testing.T) { test.expect_hover(t, &source, "test.foo: proc(array: $A/[dynamic]$T)") } - @(test) ast_hover_proc_call_implicit_selector_with_default_value :: proc(t: ^testing.T) { source := test.Source { @@ -4458,6 +4457,19 @@ ast_hover_proc_call_implicit_selector_with_default_value :: proc(t: ^testing.T) } test.expect_hover(t, &source, "test.Option: .B") } + +@(test) +ast_hover_casted_variable :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + main :: proc() { + foo: int = 25 + bar := cast(f32)fo{*}o + } + `, + } + test.expect_hover(t, &source, "test.foo: int") +} /* Waiting for odin fix -- cgit v1.2.3