summaryrefslogtreecommitdiff
path: root/infer.c
diff options
context:
space:
mode:
Diffstat (limited to 'infer.c')
-rw-r--r--infer.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/infer.c b/infer.c
index 348b43b..0a88c82 100644
--- a/infer.c
+++ b/infer.c
@@ -197,17 +197,10 @@ static bool infer_from_type(Typer *tr, Type *match, Type *to, Identifier *idents
if (!infer_from_type(tr, match->slice, to->slice, idents, vals, types, where))
return false;
break;
- case TYPE_STRUCT: {
- if (to->kind != TYPE_STRUCT) return true;
- Field *fields_m = match->struc->fields;
- Field *fields_t = to->struc->fields;
- size_t i, len = arr_len(fields_m);
- if (len != arr_len(fields_t)) return true;
- for (i = 0; i < len; ++i) {
- if (!infer_from_type(tr, &fields_m[i].type, &fields_t[i].type, idents, vals, types, where))
- return false;
- }
- } break;
+ case TYPE_STRUCT:
+ /* this would be difficult because match could contain #ifs and
+ no sane person will ever write something that needs this */
+ break;
case TYPE_EXPR: {
Expression *to_expr = to->was_expr;
Expression e = {0};