aboutsummaryrefslogtreecommitdiff
path: root/boot/type_check.cc
diff options
context:
space:
mode:
Diffstat (limited to 'boot/type_check.cc')
-rw-r--r--boot/type_check.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/boot/type_check.cc b/boot/type_check.cc
index ea0bcd5..42e7227 100644
--- a/boot/type_check.cc
+++ b/boot/type_check.cc
@@ -1159,9 +1159,11 @@ namespace elna::boot
else if (const auto left_constant = left.get<constant_type>())
{
const std::shared_ptr<constant_type> right_constant = right.get<constant_type>();
+ const type right_unqualified = right_constant != nullptr
+ ? right_constant->unqualified
+ : right;
- return right_constant != nullptr
- && bind_arguments(parameters, bindings, left_constant->unqualified, right_constant->unqualified);
+ return bind_arguments(parameters, bindings, left_constant->unqualified, right_unqualified);
}
else if (const auto left_instance = left.get<instantiated_type>())
{
@@ -1334,8 +1336,10 @@ namespace elna::boot
while (argument_iterator != std::cend(call.arguments)
&& declared_iterator != std::cend(procedure.symbol.parameters))
{
+ const type actual = unqualify((*argument_iterator)->type_decoration);
+
if (!bind_arguments(procedure.parameters, bindings,
- *declared_iterator, (*argument_iterator)->type_decoration))
+ *declared_iterator, actual))
{
add_error<generic_error>((*argument_iterator)->position(), reference.name,
generic_error::shape_mismatch{