Closed pherrymason closed 1 week ago
In version 0.5.5 this code is failing to compile:
0.5.5
module core::actions; import std::collections::list; interface Action { fn bool enter(); fn bool update(float dt); } struct ActionList { char* name; List(<Action*>) actions; }
With the error: FATAL ERROR Should be unreachable -> in sema_expr_analyse_type_access @ in /xxxxx/src/compiler/sema_expr.c:3116
FATAL ERROR Should be unreachable -> in sema_expr_analyse_type_access @ in /xxxxx/src/compiler/sema_expr.c:3116
Looks like the culprit is the List(<Action*>), as soon as I replace it with List(<int>) it compiles properly.
List(<Action*>)
List(<int>)
I'm on Mac aarch64. Built c3c with llvm: stable 18.1.6
I have fixed this in the dev branch.
dev
Tested and working! Thanks!
In version
0.5.5
this code is failing to compile:With the error:
FATAL ERROR Should be unreachable -> in sema_expr_analyse_type_access @ in /xxxxx/src/compiler/sema_expr.c:3116
Looks like the culprit is the
List(<Action*>)
, as soon as I replace it withList(<int>)
it compiles properly.I'm on Mac aarch64. Built c3c with llvm: stable 18.1.6