Skip to content

Support semantic token for | null #1381

@MangelMaxime

Description

@MangelMaxime

Version

Ionide 7.26.4

Dotnet Info

.NET SDK:
Version: 9.0.302
Commit: bb2550b9af
Workload version: 9.0.300-manifests.fadeff71
MSBuild version: 17.14.13+65391c53b

Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: linux-x64
Base Path: /home/mmangel/.dotnet/sdk/9.0.302/

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

Host:
Version: 9.0.7
Architecture: x64
Commit: 3c298d9f00

.NET SDKs installed:
6.0.428 [/home/mmangel/.dotnet/sdk]
7.0.410 [/home/mmangel/.dotnet/sdk]
8.0.408 [/home/mmangel/.dotnet/sdk]
9.0.203 [/home/mmangel/.dotnet/sdk]
9.0.302 [/home/mmangel/.dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.36 [/home/mmangel/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [/home/mmangel/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.15 [/home/mmangel/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.4 [/home/mmangel/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.7 [/home/mmangel/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [/home/mmangel/.dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [/home/mmangel/.dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.15 [/home/mmangel/.dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.4 [/home/mmangel/.dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.7 [/home/mmangel/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
DOTNET_ROOT [/home/mmangel/.dotnet]

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Steps to reproduce

  1. Write the following code
let toUpper (txt : string | null) = ()
  1. Move cursor to null
  2. In Ionide, execute the command Inspect editor tokens [...]

See that for string we get semantic token type

Image

but not for null

Image

Details

null should have a semantic token type information like string

Or perhaps we should cover sting | null as a single semantic token type

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