Skip to content

:= operator inlay hint shows wrong type for enums #881

Open
@tehKaiN

Description

@tehKaiN

Godot version

4.4.1.stable

VS Code version

1.101.2

Godot Tools VS Code extension version

2.5.1

System information

Windows 10

Issue description

When using the := operator to initialize the enum variable, the inlay hint shows the class_name contents (or file name if class_name is missing).

Image

The variable hover info resolves properly, but it looks like that it only takes the first part of the period-separated type.

Image

Steps to reproduce

  1. Use following code
extends Node

enum MyEnum { FOO, BAR, BAZ }

var a := MyEnum.FOO
  1. Observe that inlay hint is wrong
  2. Optionally add class_name EnumTest and observe that the inlay hint changes to EnumTest.

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