File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
For a list of breaking changes, check [ here] ( #breaking-changes )
4
4
5
+ ## v0.2.3
6
+
7
+ ### Enhancements / fixes
8
+
9
+ - if with falsy literal returns nil [ #529 ] ( https://github.com/borkdude/sci/issues/529 )
10
+
5
11
## v0.2.2
6
12
7
13
### Enhancements / fixes
Original file line number Diff line number Diff line change 1
- 0.2.3-SNAPSHOT
1
+ 0.2.3
Original file line number Diff line number Diff line change 474
474
3 (let [condition (nth children 0 )
475
475
then (nth children 1 )
476
476
else (nth children 2 )]
477
- (cond (not condition) nil
477
+ (cond (not condition) else
478
478
(constant? condition) then
479
479
:else (ctx-fn
480
480
(fn [ctx]
Original file line number Diff line number Diff line change 50
50
(testing " if and when"
51
51
(is (= 1 (eval* 0 '(if (zero? *in*) 1 2 ))))
52
52
(is (= 2 (eval* 1 '(if (zero? *in*) 1 2 ))))
53
+ (is (= 10 (eval* " (if true 10 20)" )))
54
+ (is (= 20 (eval* " (if false 10 20)" )))
53
55
(is (thrown-with-msg? #?(:clj Exception :cljs js/Error) #"Too few arguments to if"
54
56
(eval* '(if ))))
55
57
(is (thrown-with-msg? #?(:clj Exception :cljs js/Error) #"Too few arguments to if"
You can’t perform that action at this time.
0 commit comments