aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-08-03 13:14:09 +0100
committergingerBill <bill@gingerbill.org>2023-08-03 13:14:09 +0100
commitb495a302b016d37a19a95cac56dc7f67fdc4ba73 (patch)
tree8fb72c3f264a61ce442c0a71e84483b31389ca6e /src/check_type.cpp
parentc39a3603720917d6970026e5c0595d468ea9b372 (diff)
parent9453b2387b2cc7c473547997703c305e7982f5e4 (diff)
Merge branch 'master' into tilde
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index a68f83ba9..4704f8b9b 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -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 ((check_vet_flags(param) & VetFlag_UsingParam) && is_using) {
+ ERROR_BLOCK();
+ error(param, "'using' on a procedure parameter is now allowed when '-vet' or '-vet-using-param' 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);