Files
golang.go/test/fixedbugs/issue78314.go
Robert Griesemer 238d7bddeb go/types, types2: in range-over-func, the yield function cannot be variadic
Fixes #78483.
For #78314.

Change-Id: If83983c0bf79840aa02dc0d2fa8945f5e8b4e969
Reviewed-on: https://go-review.googlesource.com/c/go/+/761682
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jakub Ciolek <jakub@ciolek.dev>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
2026-04-01 16:39:05 -07:00

15 lines
303 B
Go

// errorcheck
// Copyright 2026 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
func F() {
for range (func(func(int, ...string) bool))(nil) { // ERROR "cannot be variadic"
}
}
func main() {}