diff options
author | Russ Cox <rsc@golang.org> | 2014-04-14 09:48:11 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-04-14 09:48:11 -0400 |
commit | eefdadea3fd0782d3146598ac3e332347f4cf311 (patch) | |
tree | ee9fccd7f818df79561056def29f1338b6e43328 /test | |
parent | 2d834620ca65cc2102dbd8c3d1d3a579a8da462a (diff) | |
download | go-eefdadea3fd0782d3146598ac3e332347f4cf311.tar.gz |
undo CL 66510044 / 6c0339d94123
Broke other things - see issue 7522.
Fixes issue 7522.
Reopens issue 7363.
??? original CL description
cmd/gc: make embedded, unexported fields read-only.
Fixes issue 7363.
LGTM=gri
R=gri, rsc, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/66510044
???
LGTM=r, mpvl
R=golang-codereviews, r
CC=golang-codereviews, iant, mpvl
https://codereview.appspot.com/85580046
Diffstat (limited to 'test')
-rw-r--r-- | test/fixedbugs/issue7363.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/test/fixedbugs/issue7363.go b/test/fixedbugs/issue7363.go deleted file mode 100644 index 726396a7c..000000000 --- a/test/fixedbugs/issue7363.go +++ /dev/null @@ -1,26 +0,0 @@ -// run - -// Copyright 2014 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. - -// issue 7363: CanSet must return false for unexported embedded struct fields. - -package main - -import "reflect" - -type a struct { -} - -type B struct { - a -} - -func main() { - b := &B{} - v := reflect.ValueOf(b).Elem().Field(0) - if v.CanSet() { - panic("B.a is an unexported embedded struct field") - } -} |