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

Issue 13113 - cannot build druntime's gc.d with -debug=INVARIANT, bad @nogc inference? #3775

Merged
merged 1 commit into from
Jul 20, 2014

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Jul 16, 2014

https://issues.dlang.org/show_bug.cgi?id=13113

Bypass attribute check on direct invariant calls.

… bad @nogc inference?

Bypass attribute check on direct invariant calls.
@WalterBright
Copy link
Member

I understand where you're coming from with this, but am unhappy with a few things:

  1. I agree you found a bug with the invariant not being inserted into the generated destructor. This shows a more fundamental issue, that being the logic of when they are inserted is not consistent. The hackish way this PR avoids doing attribute checking on invariant is also indicative of a structural problem.
  2. Generated functions should be processed like function literals, that's pretty much just what they are. Having a separate and differently implemented set of semantics to deal with them is indicative of a structural problem in the compiler.
  3. I'm pretty uneasy about exempting invariant from attribute checking.

That leaves us with "what do we do about this release"? Both yours and my solutions have problems. What do you think?

@WalterBright
Copy link
Member

I'll pull this in the interests of getting the release out, but points 1 and 2 are still valid.

@WalterBright
Copy link
Member

Auto-merge toggled on

WalterBright added a commit that referenced this pull request Jul 20, 2014
Issue 13113 - cannot build druntime's gc.d with -debug=INVARIANT, bad @nogc inference?
@WalterBright WalterBright merged commit 8e56b9f into dlang:master Jul 20, 2014
@9rnsr 9rnsr deleted the fix13113 branch July 21, 2014 02:48
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