aboutsummaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/types.c b/types.c
index 30f648b5..47c0103f 100644
--- a/types.c
+++ b/types.c
@@ -300,24 +300,6 @@ bool can_promote(type_t *actual, type_t *needed)
return true;
}
- if (actual->tag == StructType) {
- auto actual_struct = Match(actual, StructType);
- auto needed_struct = Match(needed, StructType);
- // TODO: allow promoting with uninitialized or extraneous values?
- for (arg_t *needed_field = needed_struct->fields, *actual_field = actual_struct->fields;
- needed_field || actual_field;
- needed_field = needed_field->next, actual_field = actual_field->next) {
-
- if (!needed_field || !actual_field)
- return false;
-
- // TODO: check field names??
- if (!can_promote(actual_field->type, needed_field->type))
- return false;
- }
- return true;
- }
-
return false;
}