Skip to content

Enums are invisible when using bitfields in C #655

@Kyren223

Description

@Kyren223

I have the following C struct where KrTokenKind is an enum

struct KrToken {
  u32 index : 24;
  KrTokenKind kind : 7;
  u32 virtual : 1;
};

It is invisible when accessed directly without casting

Image

And in locals

Image

A temporary workaround is in the parent type (KrToken) to add a type view with the cast:
rows($, (KrTokenKind)$.kind, $.index, (bool)$.virtual)

Image

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