Skip to content

VS tooltip display too verbose when calling overloaded method with wrong parameter types #6578

@smoothdeveloper

Description

@smoothdeveloper

This is an error message improvement suggestion after seeing a picture posted in fsharp.org's slack (user Alanay).

Overload can be little tricky at times, when the overload count is too too high, it would be good to have the VS tooltip show a prettier summary.

Repro steps

Here is a simple case with System.Convert.ToString :

let a = System.Convert.ToString('w',4);;

Actual behavior

image

Expected behavior

Looking for proposals, here is a first one which would read better:

No overloads match for method 'ToString'.

Argument types given:
  - char
  - int
  
Available overloads:
  - Convert.ToString(value: obj, provider: IFormatProvider)
  - Convert.ToString(value: bool, provider: IFormatProvider)
  - Convert.ToString(value: bool, provider: IFormatProvider)
  - Convert.ToString(value: char, provider: IFormatProvider)
  - Convert.ToString(value: sbyte, provider: IFormatProvider)
  - Convert.ToString(value: byte, provider: IFormatProvider)
  ... exhaustive list we partially see

Workarounds

  • reduce overload count
  • taller screens

Related information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions