diff options
| author | gingerBill <bill@gingerbill.org> | 2023-01-16 13:22:37 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-01-16 13:22:37 +0000 |
| commit | 5d397804f7c02a2a71a10dd3af2f59a1bb3b4a10 (patch) | |
| tree | 5a5d1e630d903f4335ceeb0557b4644974d71ccb /src/check_type.cpp | |
| parent | a5a7226885718e701665a7a5eb2528dcd2506f0a (diff) | |
Fix #2286 by printing an error correctly
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index ad746514e..ec661134b 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -1655,6 +1655,12 @@ gb_internal Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_para } else if (!ctx->no_polymorphic_errors) { // NOTE(bill): The type should be determined now and thus, no need to determine the type any more is_type_polymorphic_type = false; + Entity *proc_entity = entity_from_expr(op.expr); + if ((proc_entity != nullptr) && (op.value.kind == ExactValue_Procedure)) { + if (is_type_polymorphic(proc_entity->type, false)) { + error(op.expr, "Cannot determine complete type of partial polymorphic procedure"); + } + } } } if (is_poly_name) { |