aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-12-06 05:42:12 -0500
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-12-06 05:42:12 -0500
commit59753fbf1f14b2aa2a211addc96730bbceef9a32 (patch)
treea1deac3120a803228317ec11c681a424f3f5ca0d /tests
parentaa2378e8bd44f7ff5b8772802a020e47009c114b (diff)
Handle references with attributes
Diffstat (limited to 'tests')
-rw-r--r--tests/references_test.odin18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/references_test.odin b/tests/references_test.odin
index 021033b..7bd2dcc 100644
--- a/tests/references_test.odin
+++ b/tests/references_test.odin
@@ -1520,3 +1520,21 @@ ast_references_enum_with_enumerated_array :: proc(t: ^testing.T) {
test.expect_reference_locations(t, &source, locations[:])
}
+
+@(test)
+ast_references_deferred_attributes :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ foo :: proc() {}
+
+ @(deferred_in = fo{*}o)
+ bar :: proc() {}
+ `,
+ }
+ locations := []common.Location {
+ {range = {start = {line = 1, character = 2}, end = {line = 1, character = 5}}},
+ {range = {start = {line = 3, character = 18}, end = {line = 3, character = 21}}},
+ }
+
+ test.expect_reference_locations(t, &source, locations[:])
+}