Skip to content

Bitfield generations for bools generate invalid comparison expressions (and errors) #508

Description

@kkukshtel
Screen Shot 2023-12-07 at 7 14 25 AM

For the get - "Cannot cast expression of type int to bool"
For the set - "Cannot apply operator & to operands of type bool and int.

Here's the relevant struct parts this is generated from:

struct ImGuiDockNode
{
     ...
    bool IsVisible :1;
    bool IsFocused :1;
    bool IsBgDrawnThisFrame :1;
    bool HasCloseButton :1;
    bool HasWindowMenuButton :1;
    bool HasCentralNodeChild :1;
    bool WantCloseAll :1;
    bool WantLockSizeOnce :1;
    bool WantMouseMove :1;
    bool WantHiddenTabBarUpdate :1;
    bool WantHiddenTabBarToggle :1;
};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions