shithub: mc

Download patch

ref: 8303e07068b39bb6de362eafff89c7a3a53206cc
parent: fcb38bff6b06d23a3499bd13bc683754cb10dec0
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Apr 14 20:11:17 EDT 2016

Make named types use custom formatters.

	If we have a named type aliasing to a subtype with a formatter
	installed, we should use that custom formatter, instead of the
	fallback formatter.

--- a/lib/std/fmt.myr
+++ b/lib/std/fmt.myr
@@ -233,7 +233,7 @@
 			if ha == gotarg
 				std.slpush(&opts, (o, a))
 			else
-				std.fatal("invalid option {}", o)
+				std.fatal("invalid option {} ", o)
 			;;
 		;;
 	;;
@@ -402,7 +402,7 @@
 		vabytes(ap)
 	| `Tyname (name, desc):
 		subap = vaenter(ap)
-		fallbackfmt(sb, params, desc, &subap)
+		fmtval(sb, desc, &subap, params)
 		vabytes(ap)
 	;;
 }