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.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/boot/type_check.cc b/boot/type_check.cc
index 5078da1..8847693 100644
--- a/boot/type_check.cc
+++ b/boot/type_check.cc
@@ -344,9 +344,9 @@ namespace elna::boot
}
else if (auto record = referent.get<record_type>())
{
- for (const auto& [field_name, field_type] : record->fields)
+ for (const auto& [field_name, field] : record->fields)
{
- if (contains_constant_member(field_type))
+ if (contains_constant_member(field.field_type))
{
return true;
}
@@ -378,9 +378,9 @@ namespace elna::boot
if (auto record = referent.get<record_type>())
{
- for (const auto& [field_name, field_type] : record->fields)
+ for (const auto& [field_name, field] : record->fields)
{
- if (auto opaque = find_opaque_type(field_type))
+ if (auto opaque = find_opaque_type(field.field_type))
{
return opaque;
}
@@ -462,9 +462,9 @@ namespace elna::boot
}
if (auto record = resolve_aliases(checked).get<record_type>())
{
- for (const auto& [field_name, field_type] : record->fields)
+ for (const auto& [field_name, field] : record->fields)
{
- if (auto found = find_zero_sized(field_type, target))
+ if (auto found = find_zero_sized(field.field_type, target))
{
return found;
}
@@ -804,7 +804,7 @@ namespace elna::boot
{
walking_visitor::visit(declaration);
- for (const identifier_definition& variable_identifier : declaration->identifiers)
+ for (const auto& variable_identifier : declaration->identifiers)
{
auto variable_symbol = this->bag.lookup(variable_identifier.name())->is_variable();
@@ -823,7 +823,7 @@ namespace elna::boot
{
return;
}
- for (const identifier_definition& variable_identifier : declaration->identifiers)
+ for (const auto& variable_identifier : declaration->identifiers)
{
auto variable_symbol = this->bag.lookup(variable_identifier.name())->is_variable();
if (!is_assignable_from(variable_symbol->symbol, declaration->initializer->type_decoration))
@@ -945,17 +945,17 @@ namespace elna::boot
if (auto record = referent.get<record_type>())
{
- for (const auto& [field_name, field_type] : record->fields)
+ for (const auto& [field_name, field] : record->fields)
{
- if (auto opaque = find_opaque_type(field_type))
+ if (auto opaque = find_opaque_type(field.field_type))
{
add_error<type_requirement_error>(declaration->position(),
opaque.value(), type_requirement_error::kind::opaque_field);
}
- else if (has_zero_size(field_type, this->target))
+ else if (has_zero_size(field.field_type, this->target))
{
add_error<type_requirement_error>(declaration->position(),
- field_type, type_requirement_error::kind::zero_sized);
+ field.field_type, type_requirement_error::kind::zero_sized);
}
}
}
@@ -1060,9 +1060,9 @@ namespace elna::boot
}
if (auto record = subject.get<record_type>())
{
- for (const auto& [field_name, field_type] : record->fields)
+ for (const auto& [field_name, field] : record->fields)
{
- if (occurs_in(parameter, field_type))
+ if (occurs_in(parameter, field.field_type))
{
return true;
}