...

Source file src/go/doc/testdata/error1.go

Documentation: go/doc/testdata

     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  
     5  package error1
     6  
     7  type I0 interface {
     8  	// When embedded, the predeclared error interface
     9  	// must remain visible in interface types.
    10  	error
    11  }
    12  
    13  type T0 struct {
    14  	ExportedField interface {
    15  		// error should be visible
    16  		error
    17  	}
    18  }
    19  
    20  type S0 struct {
    21  	// In struct types, an embedded error must only be visible
    22  	// if AllDecls is set.
    23  	error
    24  }
    25  

View as plain text