1// compile
2
3// Copyright 2014 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7// Issues 8017 and 8058: walk modifies nodes generated
8// by slicelit and causes an internal error afterwards
9// when gen_as_init parses it back.
10
11package main
12
13func F() {
14	var ch chan int
15	select {
16	case <-ch:
17	case <-make(chan int, len([2][]int{([][]int{})[len(ch)], []int{}})):
18	}
19}
20
21func G() {
22	select {
23	case <-([1][]chan int{[]chan int{}})[0][0]:
24	default:
25	}
26}
27