mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-14 23:21:25 -07:00
Add separate -vet flags; -vet-using-* flags; //+vet file flags
This commit is contained in:
@@ -2464,6 +2464,12 @@ gb_internal void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags)
|
||||
error(us->token, "Empty 'using' list");
|
||||
return;
|
||||
}
|
||||
if (check_vet_flags(ctx) & VetFlag_UsingStmt) {
|
||||
ERROR_BLOCK();
|
||||
error(node, "'using' as a statement is now allowed when '-vet' or '-vet-using' is applied");
|
||||
error_line("\t'using' is considered bad practice to use as a statement outside of immediate refactoring\n");
|
||||
}
|
||||
|
||||
for (Ast *expr : us->list) {
|
||||
expr = unparen_expr(expr);
|
||||
Entity *e = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user