Skip to content

Infer calls based on their return types (maybe) #1137

Open
@dcodeIO

Description

@dcodeIO

Edit: While working on #1129 I stumbled upon the following pattern that cannot be inferred yet because we don't yet attempt to recognize return types:

function foo(a: Set<i32> = new Set()) { ... }
function makeSet<T>(): Set<T> { ... }
foo(makeSet()); // expected 1 type argument, but got 0

Pinning here so we don't forget.

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