Skip to content

Function overload matching improvements #18

@ItsMeBrianD

Description

@ItsMeBrianD

Right now, function overload matching is pretty naive.

The biggest issue with this is autocomplete doesn't take into account discriminated unions, for example:

Assume we have some function with 3 overloads like so, where the 1st arg determines the expected type of the second

MyFunc(<enum: "A">, <int>)
MyFunc(<enum: "B">, <string>)
MyFunc(<enum: "C">, <ref>)

If completion evaluates while the cursor is here, we only see A currently, where we should probably see A, B, and C.

MyFunc(|

In effect, all overloads valid up to the current argument should provide completions for the best DX

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions