src/internal/types/testdata/fixedbugs/issue45985.go
raw| 1 | // Copyright 2021 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package issue45985 |
| 6 | |
| 7 | func app[S interface{ ~[]T }, T any](s S, e T) S { |
| 8 | return append(s, e) |
| 9 | } |
| 10 | |
| 11 | func _() { |
| 12 | _ = app /* ERROR "S (type int) does not satisfy interface{~[]T}" */ [int] // TODO(gri) better error message |
| 13 | } |