aboutsummaryrefslogtreecommitdiff
path: root/src/check_builtin.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2022-09-01 23:42:15 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2022-09-01 23:42:15 +0200
commit635c7fa153fc52d9ee575cc7a788996ac3f10193 (patch)
tree82246b126742ef84e8370c3a36bca0762a6cb6d3 /src/check_builtin.cpp
parent803fd8f037277b9242a3f10cd5d82ca754169735 (diff)
parentb7ac0a9e8d433f130bcb562db2ffa35657564665 (diff)
Merge branch 'master' into cmark
Diffstat (limited to 'src/check_builtin.cpp')
-rw-r--r--src/check_builtin.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index e55a2e024..6af1c3d44 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -341,6 +341,13 @@ bool check_builtin_objc_procedure(CheckerContext *c, Operand *operand, Ast *call
for (isize i = 2+arg_offset; i < ce->args.count; i++) {
Operand x = {};
check_expr(c, &x, ce->args[i]);
+ if (is_type_untyped(x.type)) {
+ gbString e = expr_to_string(x.expr);
+ gbString t = type_to_string(x.type);
+ error(x.expr, "'%.*s' expects typed parameters, got %s of type %s", LIT(builtin_name), e, t);
+ gb_string_free(t);
+ gb_string_free(e);
+ }
param_types[i-arg_offset] = x.type;
}