mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00:00
731dcdae6d
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>
20 lines
373 B
Go
20 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")
|
|
}
|