]> Cypherpunks repositories - gostls13.git/commitdiff
A test for an interface which uses a forward declared type
authorIan Lance Taylor <iant@golang.org>
Sat, 22 Aug 2009 00:42:41 +0000 (17:42 -0700)
committerIan Lance Taylor <iant@golang.org>
Sat, 22 Aug 2009 00:42:41 +0000 (17:42 -0700)
which turns out to be invalid.

R=rsc
DELTA=15  (15 added, 0 deleted, 0 changed)
OCL=33691
CL=33693

test/bugs/bug195.go [new file with mode: 0644]
test/golden.out

diff --git a/test/bugs/bug195.go b/test/bugs/bug195.go
new file mode 100644 (file)
index 0000000..4d679e2
--- /dev/null
@@ -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"
index a813eba85f61c9033e3f29c04870b8e2a6872ad8..207313f590261ff6bbe3a0d226210bf199a949f2 100644 (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