blob: 1becc9c0f589541566326716c60cf9ca7812b0c6 [file] [log] [blame]
// run
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
type Recv <-chan int
type sliceOf[E any] interface {
type []E
}
func Append[S sliceOf[T], T any](s S, t ...T) S {
return append(s, t...)
}
func main() {
a := Append([]Recv{nil}, Recv(nil))
if len(a) != 2 || a[0] != nil || a[1] != nil {
panic(a)
}
}