1
0
mirror of https://github.com/golang/go synced 2024-11-25 04:07:55 -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:
Russ Cox 2009-05-12 16:09:47 -07:00
parent 28516d4c78
commit c7d30bceb2
9 changed files with 20 additions and 0 deletions

View File

@ -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 {

View File

@ -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"

View File

@ -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

View File

@ -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 }

View File

@ -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 }

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -4,6 +4,8 @@
// errchk $G $F.go
// Error messages about missing implicit methods.
package main
type T int