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

go/types: function call has invalid type just because an argument is undefined #15305

Closed
alandonovan opened this issue Apr 14, 2016 · 1 comment

Comments

@alandonovan
Copy link
Contributor

For a function call such as fmt.Print(), the type checker infers the type (n int, err error). But for a call with an invalid argument, such as fmt.Print(undefined), the type checker infers an invalid type, even though the result type is known and is independent of the arguments. This happens for single-result function calls (like fmt.Sprint) too.

I couldn't see an obvious mistake in the go/types/call.go code.

@gopherbot
Copy link

CL https://golang.org/cl/22085 mentions this issue.

@golang golang locked and limited conversation to collaborators Apr 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants