summaryrefslogtreecommitdiffstats
path: root/src/go/parser/testdata/resolution/issue45136.src
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/parser/testdata/resolution/issue45136.src')
-rw-r--r--src/go/parser/testdata/resolution/issue45136.src27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/go/parser/testdata/resolution/issue45136.src b/src/go/parser/testdata/resolution/issue45136.src
new file mode 100644
index 0000000..e1d63d8
--- /dev/null
+++ b/src/go/parser/testdata/resolution/issue45136.src
@@ -0,0 +1,27 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package issue45136
+
+type obj /* =@obj */ struct {
+ name /*=@name */ string
+}
+
+func _() {
+ var foo /* =@foo */ = "foo"
+ obj /* @obj */ ["foo"]
+ obj /* @obj */ .run()
+ obj /* @obj */ {
+ name: foo /* @foo */,
+ }
+ obj /* @obj */ {
+ name: "bar",
+ }.run()
+
+ var _ = File{key: obj /* @obj */ {}}
+ var _ = File{obj /* @obj */ {}}
+
+ []obj /* @obj */ {foo /* @foo */}
+ x /* =@x1 */ := obj /* @obj */{}
+}