summaryrefslogtreecommitdiffstats
path: root/test/fixedbugs/issue12536.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/fixedbugs/issue12536.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/fixedbugs/issue12536.go b/test/fixedbugs/issue12536.go
new file mode 100644
index 0000000..ceeaec4
--- /dev/null
+++ b/test/fixedbugs/issue12536.go
@@ -0,0 +1,22 @@
+// compile
+
+// Copyright 2017 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.
+
+// Issue 12536: compiler crashes while checking keys in a map literal for equality
+
+package p
+
+func main() {
+ m1 := map[interface{}]interface{}{
+ nil: 0,
+ true: 1,
+ }
+ m2 := map[interface{}]interface{}{
+ true: 1,
+ nil: 0,
+ }
+ println(len(m1))
+ println(len(m2))
+}