mirror of
https://github.com/janet-lang/janet
synced 2025-10-24 12:17:41 +00:00
Fix #428
Add binding check for generate verb in loops. The check is present in other loop verbs.
This commit is contained in:
@@ -319,4 +319,10 @@ neldb\0\0\0\xD8\x05printG\x01\0\xDE\xDE\xDE'\x03\0marshal_tes/\x02
|
||||
(check-jdn "a string")
|
||||
(check-jdn @"a buffer")
|
||||
|
||||
# Issue 428
|
||||
(var result nil)
|
||||
(defn f [] (yield {:a :ok}))
|
||||
(assert-no-error "issue 428 1" (loop [{:a x} :generate (fiber/new f)] (set result x)))
|
||||
(assert (= result :ok) "issue 428 2")
|
||||
|
||||
(end-suite)
|
||||
|
||||
Reference in New Issue
Block a user