mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-10 23:05:32 -04:00
Add missing -strict-style check
This commit is contained in:
1 parent
3c0f1caa41
commit
cdcb64b0d0
1 file changed
+4
@@ -2247,6 +2247,10 @@ gb_internal bool check_is_not_addressable(CheckerContext *c, Operand *o) {
|
||||
}
|
||||
|
||||
gb_internal void check_old_for_or_switch_value_usage(Ast *expr) {
|
||||
if (!build_context.strict_style) {
|
||||
return;
|
||||
}
|
||||
|
||||
Entity *e = entity_of_node(expr);
|
||||
if (e != nullptr && (e->flags & EntityFlag_OldForOrSwitchValue) != 0) {
|
||||
GB_ASSERT(e->kind == Entity_Variable);
|
||||
|
||||
Reference in new issue
Block a user