From 85791481f605ef7c4c0fda98092c730b5c1e06ea Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 27 Nov 2014 06:16:02 -0800 Subject: 347 - allow 'arg' channel to be rewound --- mu.arc.t | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mu.arc.t') diff --git a/mu.arc.t b/mu.arc.t index edab1d34..3d5695b7 100644 --- a/mu.arc.t +++ b/mu.arc.t @@ -1027,6 +1027,23 @@ (prn "F - 'arg' with index can access function call arguments out of order")) ;? (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 -- cgit 1.4.1-2-gfad0