We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Take the following example. I think the compiler should be able to infer T=string.
func generic[T any]() (t T) { return } func hello() string { return generic() // Currently Error: Cannot infer T }
Other languages like TypeScript and Java will infer the type-argument by the return signature.
The text was updated successfully, but these errors were encountered:
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Sorry, something went wrong.
No branches or pull requests
Proposal Details
Take the following example. I think the compiler should be able to infer T=string.
Other languages like TypeScript and Java will infer the type-argument by the return signature.
The text was updated successfully, but these errors were encountered: