Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep enum members when used as enum values #157

Closed
jacob-carlborg opened this issue Jul 3, 2017 · 1 comment
Closed

Keep enum members when used as enum values #157

jacob-carlborg opened this issue Jul 3, 2017 · 1 comment

Comments

@jacob-carlborg
Copy link
Owner

jacob-carlborg commented Jul 3, 2017

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
}
ciechowoj added a commit to ciechowoj/dstep that referenced this issue Oct 19, 2017
ciechowoj added a commit to ciechowoj/dstep that referenced this issue Oct 21, 2017
ciechowoj added a commit to ciechowoj/dstep that referenced this issue Oct 21, 2017
ciechowoj added a commit to ciechowoj/dstep that referenced this issue Oct 21, 2017
ciechowoj added a commit to ciechowoj/dstep that referenced this issue Oct 21, 2017
ciechowoj added a commit to ciechowoj/dstep that referenced this issue Mar 18, 2018
ciechowoj added a commit to ciechowoj/dstep that referenced this issue Mar 18, 2018
jacob-carlborg added a commit that referenced this issue Mar 18, 2018
…nslation

Implement #157, #158: Improve enum value translation.
@jacob-carlborg
Copy link
Owner Author

Fixed in 50919b6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant