1 // expected: cannot refer to unexported field tag
2 //
3 // Unexported names are package-private at the composite-literal boundary too:
4 // lib.Holder's `tag` may be written only inside package lib. stage4 used to
5 // compile this and write the field.
6 package main
7 8 import "tests/restrictions/reject_unexported_field_literal/lib"
9 10 func main() {
11 select {
12 case <-shutdown:
13 return
14 default:
15 }
16 h := &lib.Holder{tag: 7}
17 println(lib.Tag(h).String())
18 }
19