src/internal/types/testdata/fixedbugs/issue76220.go
raw| 1 | // Copyright 2025 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 p |
| 6 | |
| 7 | func _() { |
| 8 | append(nil /* ERROR "argument must be a slice; have untyped nil" */, ""...) |
| 9 | } |
| 10 | |
| 11 | // test case from issue |
| 12 | |
| 13 | func main() { |
| 14 | s := "hello" |
| 15 | msg := append(nil /* ERROR "argument must be a slice; have untyped nil" */, s...) |
| 16 | print(msg) |
| 17 | } |