mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Add asserts, tracking Windows bug
This commit is contained in:
@@ -53,7 +53,7 @@ void expr_contract_array(ExprConst *expr_const, ConstKind contract_type)
|
||||
{
|
||||
if (expr_const->const_kind == CONST_SLICE && !expr_const->slice_init)
|
||||
{
|
||||
*expr_const = (ExprConst) { .const_kind = contract_type };
|
||||
*expr_const = (ExprConst) { .const_kind = contract_type, .bytes.ptr = NULL, .bytes.len = 0 };
|
||||
return;
|
||||
}
|
||||
ASSERT(expr_const->const_kind == CONST_INITIALIZER || expr_const->const_kind == CONST_SLICE);
|
||||
|
||||
@@ -145,6 +145,7 @@ 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;
|
||||
ASSERT(is_bytes || left->const_expr.const_kind == CONST_STRING);
|
||||
Type *indexed = type_get_indexed_type(left->type);
|
||||
const char *left_bytes = left->const_expr.bytes.ptr;
|
||||
RETRY:;
|
||||
|
||||
Reference in New Issue
Block a user