~jojo/Carth

816a8e1ea95c40a56a0ab1ea7ee72157e7b3ab21 — JoJo 5 months ago 945c734
Add test for latest bug fix
1 files changed, 15 insertions(+), 0 deletions(-)

A test/tests/good/free-vars_0.carth
A test/tests/good/free-vars_0.carth => test/tests/good/free-vars_0.carth +15 -0
@@ 0,0 1,15 @@
;; 1337

;; Reproduces bug fixed in #945c734

(import std)

(define (foo x)
  (define (go bar)
    (fun (b) (let1 bar (- bar b)
               (if (> bar 0)
                   (go bar b)
                 1337))))
  (go x 1))

(define main (display (show-int (foo 10))))