Fix bad code in assert

This commit is contained in:
Christoffer Lerno
2023-02-28 17:50:01 +01:00
parent 9db845903e
commit 6188a8b5df

View File

@@ -67,7 +67,7 @@ Type *type_infer_len_from_actual_type(Type *to_infer, Type *actual_type)
// Handle int[*]! a = { ... } by stripping the optional.
bool is_optional = type_is_optional(to_infer);
assert(is_optional || !type_is_optional(actual_type) && "int[*] x = { may_fail } should have been caught.");
assert((is_optional || !type_is_optional(actual_type)) && "int[*] x = { may_fail } should have been caught.");
// Strip the optional
if (is_optional) to_infer = to_infer->optional;