]> Cypherpunks repositories - gostls13.git/commitdiff
cannot have interfaces refer to themselves as map keys
authorRob Pike <r@golang.org>
Fri, 26 Jun 2009 01:44:28 +0000 (18:44 -0700)
committerRob Pike <r@golang.org>
Fri, 26 Jun 2009 01:44:28 +0000 (18:44 -0700)
R=rsc
DELTA=11  (11 added, 0 deleted, 0 changed)
OCL=30774
CL=30774

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

diff --git a/test/bugs/bug165.go b/test/bugs/bug165.go
new file mode 100644 (file)
index 0000000..02a6c37
--- /dev/null
@@ -0,0 +1,11 @@
+// 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 I interface {
+       m(map[I] bool)
+}
index 695a68cd411a7f98cf77398532ac07ecedd8d7c9..09ac96269a0862a6b40b6a13e0f67eab89284882 100644 (file)
@@ -111,6 +111,10 @@ BUG: should not compile
 =========== bugs/bug164.go
 BUG: should not compile
 
+=========== bugs/bug165.go
+bugs/bug165.go:6: invalid map key type I
+BUG: should compile
+
 =========== fixedbugs/bug016.go
 fixedbugs/bug016.go:7: constant -3 overflows uint