1
0
mirror of https://github.com/golang/go synced 2024-11-11 21:40:21 -07:00
go/test/fixedbugs/issue7996.go
Russ Cox ec38c6f5e3 cmd/gc: fix duplicate map key check
Do not compare nil and true.

Fixes #7996.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/91470043
2014-05-15 15:34:37 -04:00

15 lines
309 B
Go

// compile
// Copyright 2014 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.
// /tmp/x.go:5: illegal constant expression: bool == interface {}
package p
var m = map[interface{}]struct{}{
nil: {},
true: {},
}