-
-
Notifications
You must be signed in to change notification settings - Fork 598
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 11042 - Inconsistent "static condition" behaviors #2558
Conversation
I'm not sure this is a correct design. Consider:
The 'static if' characteristic applies to the expression inside the typeof(). But should it? I think the lazy evaluation of && and || should only apply at the top level. |
The main point of issue 11042 is: The 'static if' characteristic should not affect inside
Even in static condition,
That's what this PR is implementing. |
@@ -125,7 +125,7 @@ void *Scope::operator new(size_t size) | |||
this->intypeof = enclosing->intypeof; | |||
this->speculative = enclosing->speculative; | |||
this->callSuper = enclosing->callSuper; | |||
this->flags = (enclosing->flags & (SCOPEcontract | SCOPEdebug | SCOPEctfe)); | |||
this->flags = (enclosing->flags & (SCOPEcontract | SCOPEdebug | SCOPEctfe | SCOPEconstraint)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure about this? How can you get a nested scope with a template constraint?
LGTM |
Why this PR is left for one year? |
3807e32
to
98519c0
Compare
Divide `SCOPEcondition` and `SCOPEconstraint` properly.
Auto-merge toggled on |
Github's makes it difficult to keep track of open pull requests, because it's notification driven. |
ping dlang/druntime#934 :) |
Issue 11042 - Inconsistent "static condition" behaviors
http://d.puremagic.com/issues/show_bug.cgi?id=11042
Divide
SCOPEcondition
andSCOPEconstraint
properly.