Source file
test/alg.go
1
2
3
4
5
6
7
8
9
10
11 package main
12
13 import "fmt"
14
15
16 func f(m map[[8]string]int) int {
17 var k [8]string
18 return m[k]
19 }
20
21
22 func g(m map[[8]interface{}]int) int {
23 var k [8]interface{}
24 return m[k]
25 }
26
27
28 func h(m map[[2]string]int) int {
29 var k [2]string
30 return m[k]
31 }
32
33 type T map[string]interface{}
34
35 func v(x ...string) string {
36 return x[0] + x[1]
37 }
38
39 func main() {
40 fmt.Println(
41 f(map[[8]string]int{}),
42 g(map[[8]interface{}]int{}),
43 h(map[[2]string]int{}),
44 v("a", "b"),
45 )
46 }
47
View as plain text