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

[REG2.064] Issue 14944 - cannot initialize static array by static this() #5013

Merged
merged 1 commit into from
Sep 2, 2015

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Sep 1, 2015

int ismemset; // !=0 if setting the contents of an array
// &1 != 0 if setting the contents of an array
// &2 != 0 if setting the content of ref variable
int ismemset;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make it a flag enum right away? Code like !(ismemset & 1) is literally unreadable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had forgotten to use enums to name these flags...

MartinNowak added a commit that referenced this pull request Sep 2, 2015
[REG2.064] Issue 14944 - cannot initialize static array by static this()
@MartinNowak MartinNowak merged commit e6e75a6 into dlang:stable Sep 2, 2015
@9rnsr 9rnsr deleted the fix14944 branch September 2, 2015 10:13
kinke added a commit to kinke/ldc that referenced this pull request Oct 3, 2015
It may be the initialization of the variable's hidden pointer,
or the initialization of the pointee.

This fixes bugzilla 14944 for us (tested in `runnable/sctor.d`),
see dlang/dmd#5013.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants