1
0
mirror of https://github.com/golang/go synced 2024-11-12 02:50:25 -07:00

cannot have interfaces refer to themselves as map keys

R=rsc
DELTA=11  (11 added, 0 deleted, 0 changed)
OCL=30774
CL=30774
This commit is contained in:
Rob Pike 2009-06-25 18:44:28 -07:00
parent 5851a1b5ad
commit 7de4883412
2 changed files with 15 additions and 0 deletions

11
test/bugs/bug165.go Normal file
View File

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

View 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