func add = (
func(a, b int) int {
return a + b
}
func(a, b string) string {
return a + b
}
)
println add(100, 7)
println add("Hello", "World")
When the location is in add, the expected location should be func(a, b int) int, but the current location is func (a.
Because the go function generated by the first add of the current anonymous function is aaa__1, the wrong length is obtained.
When the location is in add, the expected location should be
func(a, b int) int, but the current location isfunc (a.Because the go function generated by the first add of the current anonymous function is aaa__1, the wrong length is obtained.