1// compile
2
3// Copyright 2019 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7// This code was incorrectly flagged as erroneous by gccgo.
8
9package main
10
11type Name string
12
13type EFunc func(int) int
14
15func Register(f EFunc, names ...Name) int {
16	return f(len(names))
17}
18
19const (
20	B Name = "B"
21)
22
23func RegisterIt() {
24	n := B + "Duck"
25	d := B + "Goose"
26	f := func(x int) int { return x + 9 }
27	Register(f, n, d)
28}
29
30func main() {
31	RegisterIt()
32}
33