Skip to content

Using TypedArray with an enum causes 'get_class_static' is not a member of ... #1584

Closed
@ZacharieBeauchemin

Description

@ZacharieBeauchemin

Godot version

4.3

godot-cpp version

4.3

System information

Windows 11

Issue description

When creating a TypedArray the following error occurs:

error: 'get_class_static' is not a member of ...
set_typed(Variant::OBJECT, T::get_class_static(), Variant());

Steps to reproduce

Create an enum like so:

namespace Game {
    enum Direction {
        Up,
        Down,
        Left,
        Right
    };
}

VARIANT_ENUM_CAST(Game::Direction)

Try to use it as the type for a TypedArray like so:

godot::TypedArray<Game::Direction> sequence;

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions