In parsing array type declaration, The type check of array size was restricted to `int`. Broaden the test to accept any valid integer kind. Fixes #1175.
19 lines
171 B
Go
19 lines
171 B
Go
package main
|
|
|
|
type Level int8
|
|
|
|
const (
|
|
a Level = -1
|
|
b Level = 5
|
|
d = b - a + 1
|
|
)
|
|
|
|
type counters [d]int
|
|
|
|
func main() {
|
|
println(len(counters{}))
|
|
}
|
|
|
|
// Output:
|
|
// 7
|