mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-23 06:05:00 -07:00
Add separate -vet flags; -vet-using-* flags; //+vet file flags
This commit is contained in:
@@ -1474,6 +1474,12 @@ gb_internal Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_para
|
||||
Type *specialization = nullptr;
|
||||
|
||||
bool is_using = (p->flags&FieldFlag_using) != 0;
|
||||
if ((build_context.vet_flags & VetFlag_UsingParam) && is_using) {
|
||||
ERROR_BLOCK();
|
||||
error(param, "'using' on a procedure parameter is now allowed when '-vet' or '-vet-using-stmt' is applied");
|
||||
error_line("\t'using' is considered bad practice to use as a statement/procedure parameter outside of immediate refactoring\n");
|
||||
|
||||
}
|
||||
|
||||
if (type_expr == nullptr) {
|
||||
param_value = handle_parameter_value(ctx, nullptr, &type, default_value, true);
|
||||
|
||||
Reference in New Issue
Block a user