-
-
Notifications
You must be signed in to change notification settings - Fork 312
Closed
Labels
Fixed needs testingNeeds verification / testing that it now worksNeeds verification / testing that it now works
Milestone
Description
Messing around with compile time macros. Likely breaking rules here and making the compiler do things it wasn't designed to do.
$foreach ( $c : $chars)
int $offset = ($c - $from) / BITS;
int $rem = ($c - $from) % BITS;
uint128 $value = $bitmap[$offset];
$value |= 1u128 << $rem;
$bitmap = $bitmap[:$offset] +++ $value +++ $bitmap[$offset+1..];
$endforeach
the final expression causes the assert violation.
The compiler encountered an unexpected error: "Violated assert: element->const_expr.const_kind == CONST_INITIALIZER".
- Function: sema_expr_analyse_ct_concat(...)
- Source file: D:\dev\c3c\src\compiler\sema_const.c:430
Metadata
Metadata
Assignees
Labels
Fixed needs testingNeeds verification / testing that it now worksNeeds verification / testing that it now works