shithub: mc

Download patch

ref: f363110a62803e055334516ba0e1899e62be65ac
parent: 9f4568a0cd45791102980cecb76aaba3ff5b254e
author: Ori Bernstein <ori@markovcorp.com>
date: Wed Aug 23 06:56:45 EDT 2017

Resolve types in match rank.

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -2723,8 +2723,8 @@
 		if (istyprimitive(ty)) {
 			bsput(mm->traits, tr->uid);
 		} else {
-			lappend(&mm->filter, &m->nfilter, ty);
-			lappend(&mm->filtertr, &m->nfiltertr, tr);
+			lappend(&mm->filter, &mm->nfilter, ty);
+			lappend(&mm->filtertr, &mm->nfiltertr, tr);
 		}
 	}
 }
--- a/parse/type.c
+++ b/parse/type.c
@@ -859,6 +859,8 @@
 	size_t i;
 	Ucon *puc, *tuc;
 
+	pat = tysearch(pat);
+	to = tysearch(to);
 	if (pat->type == Typaram)
 		return 0;
 	else if (pat->type != to->type)