File tree Expand file tree Collapse file tree 4 files changed +30
-1
lines changed Expand file tree Collapse file tree 4 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 1237
1237
1238
1238
(defmethod emit* :set!
1239
1239
[{:keys [target val env]}]
1240
- (emit-wrap env (emits target " = " val)))
1240
+ (emit-wrap env (emits " ( " target " = " val " ) " )))
1241
1241
1242
1242
(defn emit-global-export [ns-name global-exports lib]
1243
1243
(emitln (munge ns-name) " ."
Original file line number Diff line number Diff line change
1
+ ; ; Copyright (c) Rich Hickey. All rights reserved.
2
+ ; ; The use and distribution terms for this software are covered by the
3
+ ; ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4
+ ; ; which can be found in the file epl-v10.html at the root of this distribution.
5
+ ; ; By using this software in any fashion, you are agreeing to be bound by
6
+ ; ; the terms of this license.
7
+ ; ; You must not remove this notice, or any other, from this software.
8
+
9
+ (ns cljs.specials-test
10
+ (:require [cljs.test :refer-macros [deftest is]]))
11
+
12
+ (defprotocol IFoo3125
13
+ (-mutate [this]))
14
+
15
+ (defrecord Foo3125 [^:mutable x]
16
+ IFoo3125
17
+ (-mutate [this] (* 3 (set! x (inc x)))))
18
+
19
+ (def ^:dynamic *test-cljs-3125* 4 )
20
+
21
+ (deftest test-cljs-3125
22
+ (is (== 12 (let [o #js {}] (* 6 (set! (.-a o) 2 )))))
23
+ (is (== 12 (let [o #js {}] (* 6 (set! o -a 2 )))))
24
+ (is (== 15 (* 3 (set! *test-cljs-3125* (inc *test-cljs-3125*)))))
25
+ (is (== 18 (-mutate (->Foo3125 5 )))))
Original file line number Diff line number Diff line change 37
37
[cljs.pprint]
38
38
[cljs.pprint-test]
39
39
[cljs.spec-test]
40
+ [cljs.specials-test]
40
41
[cljs.spec.test-test]
41
42
[cljs.clojure-alias-test]
42
43
[cljs.hash-map-test]
85
86
'cljs.import-test
86
87
'cljs.pprint
87
88
'cljs.spec-test
89
+ 'cljs.specials-test
88
90
'cljs.spec.test-test
89
91
'cljs.clojure-alias-test
90
92
'cljs.hash-map-test
Original file line number Diff line number Diff line change 303
303
[cljs.pprint]
304
304
[cljs.pprint-test]
305
305
[cljs.spec-test]
306
+ [cljs.specials-test]
306
307
[cljs.spec.test-test]
307
308
[cljs.clojure-alias-test]
308
309
[cljs.hash-map-test]
351
352
'cljs.pprint
352
353
'cljs.pprint-test
353
354
'cljs.spec-test
355
+ 'cljs.specials-test
354
356
'cljs.spec.test-test
355
357
'cljs.clojure-alias-test
356
358
'cljs.hash-map-test
You can’t perform that action at this time.
0 commit comments