X-Git-Url: http://git.lukelau.me/?a=blobdiff_plain;f=tests.scm;h=cdd60bd92730df41c4d15077ddee7ffc61bf7f17;hb=e2081d0d8280f4c2f17fdf4cc7d3fb5f0b36c48b;hp=6dfbd9f4459cc1e46b3258caab6d5c0ba0ff2e27;hpb=e4dc23d659849c88cec8c7e57d0d463f9493850e;p=scheme.git diff --git a/tests.scm b/tests.scm index 6dfbd9f..cdd60bd 100644 --- a/tests.scm +++ b/tests.scm @@ -260,3 +260,21 @@ '((data A [foo Int] [bar Bool]) (let ([(foo x) (foo 0)]) x)))) + +(test-prog '((data A [foo Int]) + (let ([x (foo 42)]) + (let ([(foo y) x]) + (+ 2 y)))) + 44) + +(test-prog '((data A [foo Bool Int Int]) + (let ([x (foo (= 2 1) 123 45)] + [(foo a b c) x]) + (+ b c))) + (+ 123 45)) + +(test-prog '((data A [foo Int]) + (data B [bar A]) + (let ([(bar (foo x)) (bar (foo 42))]) + x)) + 42)