Login
7 branches 0 tags
Ben (X13/Arch) Mostly docs 8fd636f 3 years ago 858 Commits
nujel / tests / testsuite / casting.nuj
[1 [read/int "1"]]
[1 [read/int "1.0"]]
[1 [read/int "1.2"]]
[1 [read/int "      \n\t1"]]
[-1 [read/int "-1"]]
[-1 [read/int " -1"]]
[:type-error [try car [let [[a 10]] [when [when #t [set! a [+ 2 "2"]] #f] [set! a -1]] a]]]
;[:type-error [try car [apply [fn [α] [+ 1 α]]]]]
;[:type-error [try car [def cb [fn [α] [+ 1 α]]] [apply cb]]]
;[:type-error [try car [let [[cb [fn [α] [+ 1 α]]]] [apply cb]]]]
;[:type-error [try car [let* [def cb [fn [α] [+ 1 α]]] [apply cb]]]]
[:type-error [try car [+ '1 '[2]]]]
[:type-error [try car [- '1 '[2]]]]
[:type-error [try car [- '1 '[2 3]]]]
[:type-error [try [fn [e] [car e]] [+ "1" "2"]]]
[:type-error [try [fn [e] [car e]] [sin 1]]]
[:type-error [try [fn [e] [car e]] [ceil 1]]]
[:type-error [try [fn [e] [car e]] [floor 1]]]
[:type-error [try [fn [e] [car e]] [round 1]]]
[:type-error [try car [bytecompile '[def #nil #nil]]]]
[:type-error [try car [bytecompile '[set! #nil #nil]]]]
[:type-error [try car [bytecompile '[def]]]]
[:type-error [try car [bytecompile '[set!]]]]
[:type-error [try car [+ #x10#f]]]
[:type-error [try car [+ #x10"16"]]]
[:type-error [try car [int "8"]]]
;[:type-error [try car [+ [cadr '[1 2]] [cadr #nil] [cadr '[1]]]]]
[:type-error [try car [int "a1"]]]
[:type-error [try car [int "1a"]]]
[:type-error [try car [int "1 a"]]]
[:type-error [try car [def cb '+] [apply cb]]]