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
fix Issue 11717 - CTFE: non-constant value with array and vector ops #12083
Conversation
Thanks for your pull request, @WalterBright! Bugzilla references
|
62908ba
to
d8bd2d4
Compare
This bug has been around since Day 1 of CTFE. I don't think it needs to go into stable. |
src/dmd/dinterpret.d
Outdated
/****************************************** | ||
* Perform the operation fp on operands e1 and e2. | ||
*/ | ||
UnionExp evalu8(Loc loc, Type type, Expression e1, Expression e2) |
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.
Needs a better name.
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.
Suggestion?
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.
evaluate
would be a good start... evaluateBinExp
?
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.
done
This enables the CTFE to work on array operations, including vector types.