about summary refs log tree commit diff stats
path: root/mu.arc.t
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-11-27 06:16:02 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-11-27 06:16:02 -0800
commit85791481f605ef7c4c0fda98092c730b5c1e06ea (patch)
treea0af70c0612d6622708e1f0befc910ae1329df72 /mu.arc.t
parentb7608762eccc03c34ae9d4bc9ac3c235c42b0142 (diff)
downloadmu-85791481f605ef7c4c0fda98092c730b5c1e06ea.tar.gz
347 - allow 'arg' channel to be rewound
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t17
1 files changed, 17 insertions, 0 deletions
diff --git a/mu.arc.t b/mu.arc.t
index edab1d34..3d5695b7 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -1028,6 +1028,23 @@
 ;? (quit)
 
 (reset)
+(new-trace "new-fn-arg-random-then-sequential")
+;? (set dump-trace*)
+(add-code
+  '((def test1 [
+      (_ <- arg (1 literal))
+      ((1 integer) <- arg)  ; takes next arg after index 1
+     ])  ; should never run
+    (def main [
+      (test1 (1 literal) (2 literal) (3 literal))
+     ])))
+(run 'main)
+;? (prn memory*)
+(if (~iso memory* (obj 1 3))
+  (prn "F - 'arg' with index resets index for later calls"))
+;? (quit)
+
+(reset)
 (new-trace "new-fn-arg-status")
 (add-code
   '((def test1 [