1// Copyright 2012 The Go Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5package error2 6 7type I0 interface { 8 // When embedded, the locally-declared error interface 9 // is only visible if all declarations are shown. 10 error 11} 12 13type T0 struct { 14 ExportedField interface { 15 // error should not be visible 16 error 17 } 18} 19 20type S0 struct { 21 // In struct types, an embedded error must only be visible 22 // if AllDecls is set. 23 error 24} 25 26// This error declaration shadows the predeclared error type. 27type error interface { 28 Error() string 29} 30