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.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/boot/type_check.cc b/boot/type_check.cc
index 2bb0ddd..343b5aa 100644
--- a/boot/type_check.cc
+++ b/boot/type_check.cc
@@ -198,9 +198,9 @@ namespace elna::boot
}
else if (auto record = referent.get<record_type>())
{
- for (const type_field& field : record->fields)
+ for (const auto& [field_name, field_type] : record->fields)
{
- if (contains_constant_member(field.second))
+ if (contains_constant_member(field_type))
{
return true;
}
@@ -660,14 +660,14 @@ namespace elna::boot
}
for (const field_initializer& initializer : expression->field_initializers)
{
- for (const type_field& field : record->fields)
+ for (const auto& [field_name, field_type]: record->fields)
{
- if (field.first == initializer.name())
+ if (field_name == initializer.name())
{
- if (!is_assignable_from(field.second, initializer.value().type_decoration))
+ if (!is_assignable_from(field_type, initializer.value().type_decoration))
{
add_error<type_mismatch_error>(
- initializer.value().position(), field.second,
+ initializer.value().position(), field_type,
initializer.value().type_decoration);
}
break;