Dan Willemsen | 6ff2325 | 2015-09-15 13:49:18 -0700 | [diff] [blame] | 1 | // compile |
| 2 | |
Dan Willemsen | 0c15709 | 2016-07-08 13:57:52 -0700 | [diff] [blame] | 3 | // Copyright 2015 The Go Authors. All rights reserved. |
Dan Willemsen | 6ff2325 | 2015-09-15 13:49:18 -0700 | [diff] [blame] | 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | // Issue 11750: mkdotargslice: typecheck failed |
| 8 | |
| 9 | package main |
| 10 | |
| 11 | func main() { |
| 12 | fn := func(names string) { |
| 13 | |
| 14 | } |
| 15 | func(names ...string) { |
| 16 | for _, name := range names { |
| 17 | fn(name) |
| 18 | } |
| 19 | }("one", "two") |
| 20 | } |