aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata/slice.go
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/slice.go')
-rw-r--r--testdata/slice.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/testdata/slice.go b/testdata/slice.go
index 8182af36d..d20de76d3 100644
--- a/testdata/slice.go
+++ b/testdata/slice.go
@@ -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}