- Bitstruct with unevaluated user-defined type would cause a crash.

- Using named parameters with builtins would cause a crash.
- In some cases, using missing identifiers with builtins would cause a crash.
- Using `$defined` with function call missing arguments would cause a crash.
- Adding @nostrip to a test function would crash.
- Mixing struct splat, non-named params and named params would crash rather than to print an error.
- Creating a char vector from bytes would crash.
- Using $$wstr16 with an illegal argument would crash instead of printing an error.
This commit is contained in:
Christoffer Lerno
2026-01-19 02:49:54 +01:00
parent dd8449576f
commit 0fea6c6056
18 changed files with 115 additions and 17 deletions

View File

@@ -1092,6 +1092,7 @@ static bool sema_analyse_bitstruct(SemaContext *context, Decl *decl, bool *erase
DEBUG_LOG("Beginning analysis of %s.", decl->name ? decl->name : ".anon");
if (!sema_resolve_type_info(context, decl->strukt.container_type, RESOLVE_TYPE_DEFAULT)) return false;
Type *type = type_flatten(decl->strukt.container_type->type->canonical);
if (!sema_resolve_type_decl(context, type)) return false;
if (type_size(type) == 1)
{
decl->strukt.big_endian = false;