aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-11-13 15:40:23 -0500
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-11-13 15:50:58 -0500
commitdd4ff896dbd188762bcadede367552544d08a860 (patch)
tree65df34c4ec7d2bb1d70c6b794cb7c1460190a549 /tests
parent588eef64d261dbc375eec05bfc2a011b92ceb5c5 (diff)
Correctly resolve struct usings that are paren exprs
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 6ecfbd9..a24f448 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -5612,6 +5612,22 @@ ast_hover_local_proc_docs :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.foo :: proc()\n foo doc")
}
+
+@(test)
+ast_hover_struct_using_with_parentheses :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ Foo :: struct {
+ using bar: (struct { a: int }),
+ }
+ main :: proc() {
+ foo: Foo
+ foo.a{*}
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "Foo.a: int")
+}
/*
Waiting for odin fix