about summary refs log tree commit diff stats
path: root/mu.arc.t
diff options
context:
space:
mode:
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/mu.arc.t b/mu.arc.t
index 77909607..1eac3f79 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -2997,4 +2997,22 @@
             ((1 integer) <- copy (0 literal))))
   (prn "F - simple rewrite-rule correctly expanded"))
 
+(reset)
+(new-trace "rewrite-rule-body")
+(= traces* (queue))
+(= function* (table))
+(add-code '((rewrite foo [
+              ((default-scope scope-address) <- new (scope literal) (10 literal))
+              ((body location) <- arg)
+              (reply `(def bar ,body))
+             ])
+            (foo [
+              ((1 integer) <- copy (0 literal))
+             ])))
+;? (prn function*)
+(if (~iso function*!bar
+          '(
+            ((1 integer) <- copy (0 literal))))
+  (prn "F - rewrite-rule with body correctly expanded"))
+
 (reset)  ; end file with this to persist the trace for the final test