-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support negative, char
& bool
const generics
#12778
Support negative, char
& bool
const generics
#12778
Conversation
char
& bool
const generics
* feat: support `bool` & `char` const generics
cee0781
to
a96f0aa
Compare
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.
Thanks! Handling non-trivial expressions is indeed currently blocked on some larger refactorings to actually handle const expressions (that I have been not making much progress on for a while now...).
@flodiebold please, take a look again after CI is passed |
LGTM, thanks! @bors r+ |
☀️ Test successful - checks-actions |
…s, r=Veykril fix: un-inline `ConstScalarOrPath::from_expr_opt` Sorry, but I missed these from #12778 `@flodiebold`
Before:
After:
I tried to implement stuff like
Const<{NUM1 + 3 + NUM2}>
by using already existing constant evaluation mechanism for ordinary constants, but turned out to be harder than I thought, maybe because I've never ever tinkered with compilers before