1
0
mirror of https://github.com/golang/go synced 2024-11-25 10:27:57 -07:00
go/test/fixedbugs/bug378.go

28 lines
516 B
Go

// errchk $G $D/$F.go
// Copyright 2011 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 1387
package foo
import "bytes"
func i() {
a := make([]bytes.Buffer, 1)
b := a[0] // ERROR "unexported field"
}
func f() {
a := make([]bytes.Buffer, 1)
a = append(a, a...) // ERROR "unexported field"
}
func g() {
a := make([]bytes.Buffer, 1)
b := make([]bytes.Buffer, 1)
copy(b, a) // ERROR "unexported field"
}