aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 9f8310e44..c733cfb4c 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -2507,6 +2507,16 @@ bool check_procedure_type(CheckerContext *ctx, Type *type, Ast *proc_type_node,
break;
}
}
+ for (isize i = 0; i < result_count; i++) {
+ Entity *e = results->Tuple.variables[i];
+ if (e->kind != Entity_Variable) {
+ is_polymorphic = true;
+ break;
+ } else if (is_type_polymorphic(e->type)) {
+ is_polymorphic = true;
+ break;
+ }
+ }
type->Proc.is_polymorphic = is_polymorphic;
return success;