mirror of
https://github.com/golang/go
synced 2024-11-12 03:00:22 -07:00
describe each interface test
R=r DELTA=20 (20 added, 0 deleted, 0 changed) OCL=28707 CL=28716
This commit is contained in:
parent
28516d4c78
commit
c7d30bceb2
@ -4,6 +4,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Check that interface{M()} = *interface{M()} produces a compiler error.
|
||||
|
||||
package main
|
||||
|
||||
type Inst interface {
|
||||
|
@ -4,6 +4,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Check methods derived from embedded interface and *interface values.
|
||||
|
||||
package main
|
||||
|
||||
import "os"
|
||||
|
@ -4,6 +4,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Check that interface conversion fails when method is missing.
|
||||
|
||||
package main
|
||||
|
||||
type S struct
|
||||
|
@ -4,6 +4,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Check methods with different return types.
|
||||
|
||||
package main
|
||||
|
||||
type S struct { a int }
|
||||
|
@ -4,6 +4,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Static error messages about interface conversions.
|
||||
|
||||
package main
|
||||
|
||||
type T struct { a int }
|
||||
|
@ -4,6 +4,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Interface values containing structures.
|
||||
|
||||
package main
|
||||
|
||||
import "os"
|
||||
|
@ -4,6 +4,9 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Interface comparisons using types hidden
|
||||
// inside reflected-on structs.
|
||||
|
||||
package main
|
||||
|
||||
import "reflect"
|
||||
|
@ -4,6 +4,9 @@
|
||||
|
||||
// $G $F.go && $L $F.$A && ./$A.out
|
||||
|
||||
// Implicit methods for embedded types.
|
||||
// Mixed pointer and non-pointer receivers.
|
||||
|
||||
package main
|
||||
|
||||
type T int
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
// errchk $G $F.go
|
||||
|
||||
// Error messages about missing implicit methods.
|
||||
|
||||
package main
|
||||
|
||||
type T int
|
||||
|
Loading…
Reference in New Issue
Block a user