aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2019-11-12 11:24:17 -0800
committerMatthew Dempsky <mdempsky@google.com>2019-11-12 21:02:24 +0000
commit00e14afa0d7afdd710ef16080f0fdcbc4abd951a (patch)
tree425a52b9c8d18c8121240aad66e2dcb36b2694fd
parenta3ffb8a1ac0edc57fff7dd8d79e3ff9129ed6708 (diff)
downloadgo-00e14afa0d7afdd710ef16080f0fdcbc4abd951a.tar.xz
test: add another test case for #35518
Updates #35518. Change-Id: Icd052c8c68aae32696b5831a29e04cc4cb224b06 Reviewed-on: https://go-review.googlesource.com/c/go/+/206820 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r--test/fixedbugs/issue35518.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/fixedbugs/issue35518.go b/test/fixedbugs/issue35518.go
index 18a02d4a82..52a0ae7e62 100644
--- a/test/fixedbugs/issue35518.go
+++ b/test/fixedbugs/issue35518.go
@@ -34,3 +34,11 @@ func f2() {
m := n2 // ERROR "."
sink = &m
}
+
+func f3() {
+ var n1, n2 Node // ERROR "."
+ n1.Orig = &n1
+ n1.Orig = &n2
+
+ sink = n1.Orig.Orig
+}