aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-07 09:54:04 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-07 09:54:04 -0400
commit3bf249dc5d684995c9dcbd6045dd0b68595b4b0d (patch)
treeeb3d0cbbb9a6f9cd50017899d4db4ea9e2c9a5c9 /tests
parentb0074c3a0df4f6ccf145b8348b172a16fb13553a (diff)
Only show cast hover info if hovering over the `cast` keyword
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin14
1 files changed, 13 insertions, 1 deletions
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