Skip to content

Keep enum members when used as enum values #157

@jacob-carlborg

Description

@jacob-carlborg

The following code:

enum Foo
{
    a = 1,
    b = 2,
    c = b,
    d = c | a
};

Is translated to:

extern (C):

enum Foo
{
    a = 1,
    b = 2,
    c = 2,
    d = 3
}

While this is correct, it would be nicer if the enum members contained the original references to the other enum members.

extern (C):

enum Foo
{
    a = 1,
    b = 2,
    c = b,
    d = c | a
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions