Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
4 of 5 tasks
vmenge opened this issue Feb 2, 2025 · 1 comment · May be fixed by #1353
Open
4 of 5 tasks

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

vmenge opened this issue Feb 2, 2025 · 1 comment · May be fixed by #1353
Labels

Comments

@vmenge
Copy link

vmenge commented Feb 2, 2025

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
@vmenge vmenge added the bug label Feb 2, 2025
@baronfel
Copy link
Contributor

baronfel commented Feb 2, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants