Throw error when array is passed to variadic prelude function. Close #114.

This commit is contained in:
2022-10-06 17:57:25 +00:00
parent 8e5fe8a566
commit 94016d2c90
3 changed files with 42 additions and 12 deletions

View File

@@ -704,4 +704,21 @@ From:[(assert false (+ \"false \" \"should \" \"have \" \"been \" \"true\"))]" m
(function _testPureKissClasses []
(PureKissClass.test)
(Assert.pass))
(function _testArraysToVariadic []
(let [a [5 6 7]]
(assertThrows (+ a))
(assertThrows (- a))
(assertThrows (* a))
(assertThrows (/ a))
(assertThrows (min a))
(assertThrows (max a))
(assertThrows (= a))
(assertThrows (< a))
(assertThrows (<= a))
(assertThrows (> a))
(assertThrows (>= a))
)
(Assert.pass))