Skip to content

'No matching overload' error has too wide range #14284

@auduchinok

Description

@auduchinok

In the following example the error should probably cover only Method range.

type T() =
    static member Instance = T()

    member _.Method(_: double) = ()
    member _.Method(_: int) = ()

T.Instance.Method("")

But it covers the whole expression where the method is used:

Screenshot 2022-11-09 at 21 52 20

This behaviour is especially bad on bigger expressions, lambda arguments, and so on, as the error hides every other error and warning inside the expression.

Metadata

Metadata

Assignees

Labels

Area-LangService-DiagnosticsFCS code analysis, diagnostics, red squiggliesBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

Type

No fields configured for Bug.

Projects

Status

New

Relationships

None yet

Development

No branches or pull requests

Issue actions