Skip to content

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

Open
@shibukawa

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

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