Add assert_comptime
builtin to panic if a value is not compile-time known
#2223
Labels
assert_comptime
builtin to panic if a value is not compile-time known
#2223
Problem
After #2178 is merged it will be more difficult for users to track whether a value can be used as a for loop bound or if it will be efficient to use as an array index or not.
Happy Case
We should add an
assert_comptime
function for debugging which will panic before the loop unrolling step in SSA if a value is not known by that time. This time was chosen because the loop unrolling step is the only step (currently) that will error if a value (loop bounds) are not known at compile-time.Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: