Source file
test/fixedbugs/issue15141.go
1
2
3
4
5
6
7 package main
8
9 func main() {
10 a := f(1, 99)
11 b := g(0xFFFFFFe, 98)
12 c := h(0xFFFFFFe, 98)
13 println(a[1], b[1], c[1], a[0xFFFFFFe], b[0xFFFFFFe], c[0xFFFFFFe])
14 }
15
16
17 func f(i, y int) (a [0xFFFFFFF]byte) {
18 a[i] = byte(y)
19 return
20 }
21
22
23 func g(i, y int) [0xFFFFFFF]byte {
24 var a [0xFFFFFFF]byte
25 a[i] = byte(y)
26 return a
27 }
28
29
30 func h(i, y int) (a [0xFFFFFFF]byte) {
31 a[i] = byte(y)
32 return a
33 }
34
View as plain text