A test for an interface which uses a forward declared type

which turns out to be invalid.

R=rsc
DELTA=15  (15 added, 0 deleted, 0 changed)
OCL=33691
CL=33693
This commit is contained in:
Ian Lance Taylor 2009-08-21 17:42:41 -07:00
parent f861c7f61b
commit 5261be20eb
2 changed files with 15 additions and 0 deletions

12
test/bugs/bug195.go Normal file
View File

@ -0,0 +1,12 @@
// errchk $G $D/$F.go
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
type I1 interface { I2 } // ERROR "interface"
type I2 int
type I3 interface { int } // ERROR "interface"

View File

@ -177,3 +177,6 @@ errchk: bugs/bug193.go:14: missing expected error: 'shift'
=========== bugs/bug194.go
BUG should compile and run
$RUNFILE: line 1: PID Segmentation fault (core dumped) $G $D/$F.go
=========== bugs/bug195.go
bugs/bug195.go:9: BUG: errchk: compiler crashed