mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
@@ -1060,6 +1060,9 @@ gb_internal void check_switch_stmt(CheckerContext *ctx, Ast *node, u32 mod_flags
|
|||||||
if (ss->tag != nullptr) {
|
if (ss->tag != nullptr) {
|
||||||
check_expr(ctx, &x, ss->tag);
|
check_expr(ctx, &x, ss->tag);
|
||||||
check_assignment(ctx, &x, nullptr, str_lit("switch expression"));
|
check_assignment(ctx, &x, nullptr, str_lit("switch expression"));
|
||||||
|
if (x.type == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
x.mode = Addressing_Constant;
|
x.mode = Addressing_Constant;
|
||||||
x.type = t_bool;
|
x.type = t_bool;
|
||||||
|
|||||||
Reference in New Issue
Block a user