mirror of
https://github.com/janet-lang/janet
synced 2025-12-01 14:28:05 +00:00
Fix error behavior when calling functions with incorrect arities.
This commit is contained in:
@@ -70,4 +70,8 @@
|
||||
(= (get res 3) 4)
|
||||
(= (get res 5) 6)) "loop :pairs")
|
||||
|
||||
# Another regression test - no segfaults
|
||||
(defn afn [x] x)
|
||||
(assert (= 1 (try (afn) ([err] 1))) "calling function with wrong arity does not segfault.")
|
||||
|
||||
(end-suite)
|
||||
|
||||
Reference in New Issue
Block a user