FsAutoComplete icon indicating copy to clipboard operation
FsAutoComplete copied to clipboard

hover tooltip does not show nullable values as possibly null

Open vmenge opened this issue 11 months ago • 1 comments

Version

Ionide 7.22.0 / fsautocomplete 0.75.0+466fcfcc35ce80a34567b678192e7e4295eb320c

Dotnet Info

❯ dotnet --info
.NET SDK:
 Version:           9.0.102
 Commit:            cb83cd4923
 Workload version:  9.0.100-manifests.693890c1
 MSBuild version:   17.12.18+ed8c6aec5

Runtime Environment:
 OS Name:     arch
 OS Version:
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/9.0.102/

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.1
  Architecture: x64
  Commit:       c8acea2262

.NET SDKs installed:
  9.0.102 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 9.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 9.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/share/dotnet]

global.json file:
  Not found

Steps to reproduce

  • write a function that returns string | null
  • call it
  • inlay hints and linelens will show string | null, but hover tooltip will not (both for function and for variables assigned value returned from function)
let nullStr (_: string) : string | null = null

let eg () =
        let x = nullStr ""
        ()

Image

Image

Details

  • Expected behaviour: Tooltip shows value as string | null

  • Actual behaviour: Tooltip shows value as string

Logs

No response

Checklist

  • [x] I have looked through existing issues to make sure that this bug has not been reported before
  • [x] I have provided a descriptive title for this issue
  • [x] I have made sure that that this bug is reproducible on the latest version of the package
  • [x] I have provided all the information needed to reproduce this bug as efficiently as possible
  • [ ] I or my company would be willing to contribute this fix

vmenge avatar Feb 02 '25 21:02 vmenge

Note for later: since inlay hints and line lens have the right type rendering, this might just need to be a small change applied to TipFormatter.fs.

baronfel avatar Feb 02 '25 21:02 baronfel