Skip to content

hover tooltip does not show nullable values as possibly null #1352

@vmenge

Description

@vmenge

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

  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that that this bug is reproducible on the latest version of the package
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions