shithub: mc

Download patch

ref: e5e7c55fb3946c3f0f09f3664958b5a0f76c8715
parent: bd7afb99f71200186d0e17ca43e77158de1e0262
author: Ori Bernstein <[email protected]>
date: Mon Aug 18 13:07:07 EDT 2014

Add test for label preservation change.

--- /dev/null
+++ b/test/foldidx.myr
@@ -1,0 +1,16 @@
+use std
+
+type xy = struct
+	x : int
+	y : int
+;;
+const X = 123
+const Y = 456
+const z : xy[1] = [
+	[.x = X, .y = Y]
+]
+
+const main = {
+	std.put("%i,%i\n", z[0].x, z[0].y)
+}
+
--- a/test/tests
+++ b/test/tests
@@ -57,6 +57,7 @@
 B voidcall	E	12
 B callbig	E	42
 B nestfn	E	42
+B foldidx	P	123,456
 # B closure	E	55      ## BUGGERED
 B loop		P	0123401236789
 B subrangefor	P       12