diff options
| author | gingerBill <bill@gingerbill.org> | 2024-03-30 14:23:47 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-03-30 14:23:47 +0000 |
| commit | 2bdf5f58ef162a74e132e9a2277aaecccca0df4b (patch) | |
| tree | 7dc1ab3d7b9f4d21c94c5c43da3588fa6996c17b /src/check_expr.cpp | |
| parent | 8e1a2094a73205f0494295699ccb31f6610728b7 (diff) | |
Enforce error on old style for/switch l-value
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 3a275729f..c7a1b460a 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -2419,10 +2419,6 @@ 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 || (check_vet_flags(expr) & VetFlag_Style))) { - return; - } - Entity *e = entity_of_node(expr); if (e != nullptr && (e->flags & EntityFlag_OldForOrSwitchValue) != 0) { GB_ASSERT(e->kind == Entity_Variable); |