1 // $G $D/${F}1.go && errchk $G $D/$F.go
3 // NOTE: This test is not run by 'run.go' and so not run by all.bash.
4 // To run this test you must use the ./run shell script.
6 // Copyright 2011 The Go Authors. All rights reserved.
7 // Use of this source code is governed by a BSD-style
8 // license that can be found in the LICENSE file.
10 // Test that unexported methods are not visible outside the package.
17 type Exported interface {
21 type Implementation struct{}
23 func (p *Implementation) private() {}
27 x = new(Implementation)
33 px.private() // ERROR "private"
35 px = new(Implementation) // ERROR "private"
37 x = px // ERROR "private"