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

Type inference is not working with callback function parameters. #280

Open
shibukawa opened this issue Oct 11, 2013 · 0 comments
Open

Type inference is not working with callback function parameters. #280

shibukawa opened this issue Oct 11, 2013 · 0 comments

Comments

@shibukawa
Copy link
Contributor

JSX can detect type automatically from function parameter, but if parameter is callback function, it can't search grand child parameters.

// definition
class async {
    static function only_once.<T>(fn : (T) -> void) : (T) -> void { 
        return ...
    }
}

// user code
// JSX can't detect T == int
async.only_once((a : int) -> {
});
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