Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug:wrong anonymous overloaded function Definition location #262

Open
luoliwoshang opened this issue Apr 23, 2024 · 0 comments
Open

bug:wrong anonymous overloaded function Definition location #262

luoliwoshang opened this issue Apr 23, 2024 · 0 comments

Comments

@luoliwoshang
Copy link

luoliwoshang commented Apr 23, 2024

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.

@luoliwoshang luoliwoshang changed the title bug:Wrong anonymous overloaded function Definition location bug:wrong anonymous overloaded function Definition location Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant