diff options
Diffstat (limited to 'mu.arc.t')
-rw-r--r-- | mu.arc.t | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mu.arc.t b/mu.arc.t index eb226398..a38ddc37 100644 --- a/mu.arc.t +++ b/mu.arc.t @@ -947,6 +947,20 @@ (prn "F - function with optional second arg")) ;? (quit) +(reset) +(new-trace "new-fn-arg-by-value") +(add-fns + '((test1 + ((1 integer) <- copy (0 literal)) + ((2 integer) <- arg)) + (main + ((1 integer) <- copy (34 literal)) + (test1 (1 integer))))) +(run 'main) +;? (prn memory*) +(if (~iso memory* (obj 1 0 2 34)) + (prn "F - 'arg' passes by value")) + ; how should errors be handled? will be unclear until we support concurrency and routine trees. (reset) |