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
Closed
Assignees

Comments

@alandonovan
Copy link
Contributor

@alandonovan alandonovan commented Apr 14, 2016

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

@gopherbot gopherbot commented Apr 14, 2016

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

Loading

@gopherbot gopherbot closed this in 170c1b4 Apr 14, 2016
@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants