Skip to content

Crash in src/compiler/sema_initializers.c:1263 #2793

@ManuLinares

Description

@ManuLinares

Reproduction

union Union
{
int x;
}
typedef Foo = Union;
union Union2
{
struct bar
{
Foo x;
}
}
typedef Union3 = Union2;
typedef UnionArr = Union3[ ];
fn void test( )
{
UnionArr a = { [0].bar.x.x = 100 };
}

Compiler Output

⚠️ The compiler encountered an unexpected error: "Should be unreachable".

- Function: sema_update_const_initializer_with_designator(...)
- Source file: src/compiler/sema_initializers.c:1263

Exit Code: 1 (Line on GitHub)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions