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

Implement a general mechanism for type parameter inference #61

Closed
dcodeIO opened this issue Apr 2, 2018 · 1 comment
Closed

Implement a general mechanism for type parameter inference #61

dcodeIO opened this issue Apr 2, 2018 · 1 comment
Assignees

Comments

@dcodeIO
Copy link
Member

dcodeIO commented Apr 2, 2018

Type parameter inference is currently limited to builtins.

var a = 42.0;
abs(a); // works

function myFunc<T>(a: T) {}
myFunc(a); // does not work
myFunc<f64>(a); // works

Putting this here so I don't forget.

@dcodeIO dcodeIO self-assigned this Apr 2, 2018
dcodeIO added a commit that referenced this issue Apr 13, 2018
This catches the most common cases but doesn't yet implement inference involving the return type because some prequesites are not yet in place (see test case).
@dcodeIO
Copy link
Member Author

dcodeIO commented Apr 28, 2018

Most common cases are handled at this point, so closing this for now.

@dcodeIO dcodeIO closed this as completed Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant