shithub: mc

Download patch

ref: 548ce5467e98c95e545be3fd021da014798a942d
parent: fe0c54bda8e70766480784336fc881567620410e
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Aug 13 06:20:53 EDT 2017

Give a better error message about incomparable types.

--- a/mi/flatten.c
+++ b/mi/flatten.c
@@ -393,7 +393,7 @@
 	} else if (fields) {
 		r = comparecomplex(s, n, exprop(n));
 	} else {
-		fatal(n, "unsupported comparison on values");
+		fatal(n, "unsupported comparison on type %s", tystr(ty));
 	}
 	r->expr.type = mktype(n->loc, Tybool);
 	return r;