diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-09-01 18:30:26 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-09-01 18:30:26 +0200 |
| commit | 01e8668357d0d7399b06a16157ca522f5c1385fa (patch) | |
| tree | 53cbdd701190928c5c1b96c159f463a48d373c76 /src/check_builtin.cpp | |
| parent | 0f3cebd2b7dee02368cbdb8f92e6fb21a5a91321 (diff) | |
| parent | 000861cba8ab5c966c60b3a3869d91e98ad09ddc (diff) | |
Merge branch 'master' into sysinfo
Diffstat (limited to 'src/check_builtin.cpp')
| -rw-r--r-- | src/check_builtin.cpp | 7 |
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; } |