Skip to content

bug:wrong anonymous overloaded function Definition location #262

@luoliwoshang

Description

@luoliwoshang
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions