aboutsummaryrefslogtreecommitdiff
path: root/tests/hover_test.odin
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-28 18:23:47 -0400
committerGitHub <noreply@github.com>2025-08-28 18:23:47 -0400
commit9f911012c3496fdc5e56733f0e7e52229ec37726 (patch)
treea56915f8fc0a253cc562e5b7b5acbe629a72445a /tests/hover_test.odin
parent95adee92d78ba24478ed4be2c7b6e5b4212c7581 (diff)
parentff7f24adedf39fbd69a68a7bf691277d34d1e638 (diff)
Merge pull request #942 from BradLewis/feat/parse-defer-statements
Process defer statements and correct hover info for anonymous types
Diffstat (limited to 'tests/hover_test.odin')
-rw-r--r--tests/hover_test.odin17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 9001300..adddb89 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -4400,6 +4400,23 @@ ast_hover_ternary :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.foo: int")
}
+
+@(test)
+ast_hover_defer_statement :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+
+ foo :: proc() {
+ defer {
+ s{*}: struct {
+ bar: int,
+ }
+ }
+ }
+ `
+ }
+ test.expect_hover(t, &source, "test.s: struct {\n\tbar: int,\n}")
+}
/*
Waiting for odin fix