compiler: support constant indices with a named type

This commit is contained in:
Ayke van Laethem
2019-09-26 15:36:23 +02:00
committed by Ron Evans
parent 81c0f9af4e
commit 01e58691a1
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -2,6 +2,13 @@ package main
type MySlice [32]byte
type myUint8 uint8
// Indexing into slice with named type (regression test).
var array = [4]int{
myUint8(2): 3,
}
func main() {
l := 5
foo := []int{1, 2, 4, 5}