1
0
mirror of https://github.com/golang/go synced 2024-11-12 10:20:27 -07:00
go/test/fixedbugs/issue11750.go
David Chase 731dcdae6d cmd/compile: prepend captured args to called-closure params
Old code appended, did not play well with a closure
with a ... param.

Fixes #11075.

Change-Id: Ib7c8590c5c4e576e798837e7499e00f3494efb4a
Reviewed-on: https://go-review.googlesource.com/12580
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: David Chase <drchase@google.com>
2015-07-23 19:02:19 +00:00

21 lines
373 B
Go

// compile
// Copyright 2015 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.
// Issue 11750: mkdotargslice: typecheck failed
package main
func main() {
fn := func(names string) {
}
func(names ...string) {
for _, name := range names {
fn(name)
}
}("one", "two")
}