-
-
Notifications
You must be signed in to change notification settings - Fork 731
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 ctfe biguint #10659
base: master
Are you sure you want to change the base?
Fix ctfe biguint #10659
Conversation
…y negative value
…y negative value
Thanks for your pull request and interest in making D better, @dhawal543! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.
|
// https://issues.dlang.org/show_bug.cgi?id=10565 | ||
@safe unittest |
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.
I suppose the comment should be outdented to align with the with unittest.
This PR fixes a compile-time function evaluation (CTFE) error in biguintcore.d.
The error occurs because GC.free() cannot be interpreted at compile time.
I've added checks using __ctfe to ensure the free() operations only happen
at runtime, while allowing the functions to still be usable in CTFE.
This allows the affected functions to be used both at compile time and
runtime without errors.