diff options
| author | Rob Pike <r@golang.org> | 2009-06-25 18:44:28 -0700 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2009-06-25 18:44:28 -0700 |
| commit | ec511eeb81682ba8ec086193fa77cb4d4a72f0e0 (patch) | |
| tree | a71ba7f8ca8ca21854c6263dd4c3253d3780eb0b | |
| parent | 34daf17ae95d9da33f573085841a99a34129f41e (diff) | |
| download | golang-ec511eeb81682ba8ec086193fa77cb4d4a72f0e0.tar.gz | |
cannot have interfaces refer to themselves as map keys
R=rsc
DELTA=11 (11 added, 0 deleted, 0 changed)
OCL=30774
CL=30774
| -rw-r--r-- | test/bugs/bug165.go | 11 | ||||
| -rw-r--r-- | test/golden.out | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/bugs/bug165.go b/test/bugs/bug165.go new file mode 100644 index 000000000..02a6c379b --- /dev/null +++ b/test/bugs/bug165.go @@ -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) +} diff --git a/test/golden.out b/test/golden.out index 695a68cd4..09ac96269 100644 --- a/test/golden.out +++ b/test/golden.out @@ -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 |
