shithub: mc

Download patch

ref: 16bbf82067cacf44828b5f5023bdd6ec3b80b570
parent: da0fa1a6453838369e8d31f75d2a67777711adba
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Feb 25 05:26:58 EST 2016

Tweak test to verify nested destructure.

--- a/test/tuple.myr
+++ b/test/tuple.myr
@@ -1,13 +1,11 @@
 use std
 /* checks that we can create tuples and destructure them. exits with 42. */
 const main = {
-	var v
-	var x
-	var a
-	var b
+	var a, b, c
+	var v, x
 
-	x = 15
-	v = (x, x + 12)
-	(a, b) = v
-	std.exit(a + b)
+	x = 10
+	v = ((x, x + 12), x)
+	((a, b), c) = v
+	std.exit(a + b + c)
 }