Make sure we don't switch over bad things.

This commit is contained in:
Christoffer Lerno
2026-01-23 01:22:58 +01:00
parent ae5047b73f
commit 459969ddb2

View File

@@ -146,10 +146,10 @@ static bool sema_concat_bytes_and_other(SemaContext *context, Expr *expr, Expr *
ArraySize len = left->const_expr.bytes.len;
bool is_bytes = left->const_expr.const_kind == CONST_BYTES;
Type *indexed = type_get_indexed_type(left->type);
bool const_cast = sema_cast_const(right);
ASSERT(const_cast);
const char *left_bytes = left->const_expr.bytes.ptr;
RETRY:;
RETRY:;
(void)sema_cast_const(right);
ASSERT(expr_is_const(right));
switch (right->const_expr.const_kind)
{
case CONST_INTEGER: