shithub: mc

Download patch

ref: 0205329e24d0e078a8150020843586cbd12613c8
parent: 1a1892e5a47ac3c1ab1b1944ee1ee11fc3d1e3c8
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Feb 1 18:53:20 EST 2016

Copy traits over for Tyname when specializing.

	We were missing trait copying, which was causing some
	cases for generic trait implementations to fail.

--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -125,6 +125,7 @@
 		for (i = 0; i < t->narg; i++)
 			lappend(&arg, &narg, tyspecialize(t->arg[i], tsmap, delayed));
 		ret = mktyname(t->loc, t->name, tyspecialize(t->sub[0], tsmap, delayed));
+		ret->traits = bsdup(t->traits);
 		ret->arg = arg;
 		ret->narg = narg;
 		tytab[var->tid] = ret;