aboutsummaryrefslogtreecommitdiff
path: root/tests/definition_test.odin
diff options
context:
space:
mode:
Diffstat (limited to 'tests/definition_test.odin')
-rw-r--r--tests/definition_test.odin30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/definition_test.odin b/tests/definition_test.odin
index 6f4b982..bf9fcd7 100644
--- a/tests/definition_test.odin
+++ b/tests/definition_test.odin
@@ -59,3 +59,33 @@ ast_goto_comp_lit_field_indexed :: proc(t: ^testing.T) {
test.expect_definition_locations(t, &source, {location})
}
+
+@(test)
+ast_goto_untyped_comp_lit_in_proc :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ My_Struct :: struct {
+ one: int,
+ two: int,
+ }
+
+ my_function :: proc(my_struct: My_Struct) {
+
+ }
+
+ main :: proc() {
+ my_function({on{*}e = 2, two = 3})
+ }
+ `,
+ packages = {},
+ }
+
+ location := common.Location {
+ range = {
+ start = {line = 2, character = 4},
+ end = {line = 2, character = 7},
+ },
+ }
+
+ test.expect_definition_locations(t, &source, {location})
+}