Skip to content

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

Open

Description

@shibukawa

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) -> {
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy