From d8d3770f88d6acc37620d6577fa5a0b026fb1231 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Wed, 3 Jul 2024 12:01:22 +0100 Subject: add some failing tests for closures --- tests/clos2.bth | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/clos2.bth (limited to 'tests/clos2.bth') diff --git a/tests/clos2.bth b/tests/clos2.bth new file mode 100644 index 0000000..9e1fe24 --- /dev/null +++ b/tests/clos2.bth @@ -0,0 +1,15 @@ +(defn (k1 x) + (fn () x)) +(defn (k2 x) + (let (v x) + (fn () v))) +(def a1 (k1 100)) +(def a2 (k2 200)) +(def b1 (k1 "hello 1")) +(def b2 (k2 "hello 2")) +(say (a1)) +(say (a2)) +(say (b1)) +(say (b2)) +(say (a1)) +(say (a2)) -- cgit v1.2.3