aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-07-17 11:36:53 +0100
committerGitHub <noreply@github.com>2025-07-17 11:36:53 +0100
commit1ef0f1be6b43121f583e9ce9cd89efd283a450e2 (patch)
tree9dd60adf4f89a5eb89cedef5d0d0f0f0aaf935b5 /src
parente8b2f1eeaac191fa4edc8c06fa6a4f232666be65 (diff)
parent3e5de5f705c91812f0cd49df813f75144be6598a (diff)
Merge pull request #5476 from jon-lipstate/card_hint
add did you mean for card/len
Diffstat (limited to 'src')
-rw-r--r--src/check_builtin.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index b833c7014..5baf67135 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -2333,7 +2333,11 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
if (mode == Addressing_Invalid) {
gbString t = type_to_string(operand->type);
- error(call, "'%.*s' is not supported for '%s'", LIT(builtin_name), t);
+ if (is_type_bit_set(op_type) && id == BuiltinProc_len) {
+ error(call, "'%.*s' is not supported for '%s', did you mean 'card'?", LIT(builtin_name), t);
+ } else {
+ error(call, "'%.*s' is not supported for '%s'", LIT(builtin_name), t);
+ }
return false;
}