File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 3495
3495
; ; TODO: analyzed analyzed? should take pass name as qualified keyword arg
3496
3496
; ; then compiler passes can mark/check individually - David
3497
3497
3498
+ (defn- unsorted-map? [x]
3499
+ (and (map? x)
3500
+ (not (sorted? x))))
3501
+
3498
3502
(defn analyzed
3499
3503
" Mark a form as being analyzed. Assumes x satisfies IMeta. Useful to suppress
3500
3504
warnings that will have been caught by a first compiler pass."
3501
3505
[x]
3502
3506
(cond
3503
- (map? x) (assoc x ::analyzed true )
3507
+ (unsorted- map? x) (assoc x ::analyzed true )
3504
3508
:else (vary-meta x assoc ::analyzed true )))
3505
3509
3506
3510
(defn analyzed?
3509
3513
[x]
3510
3514
(boolean
3511
3515
(cond
3512
- (map? x) (::analyzed x)
3516
+ (unsorted- map? x) (::analyzed x)
3513
3517
:else (::analyzed (meta x)))))
3514
3518
3515
3519
(defn- all-values?
Original file line number Diff line number Diff line change 9
9
(ns cljs.macro-test
10
10
(:refer-clojure :exclude [==])
11
11
(:require [cljs.test :refer-macros [deftest is]])
12
- (:use-macros [cljs.macro-test.macros :only [==]])
12
+ (:use-macros [cljs.macro-test.macros :only [== sm-cljs-3027 ]])
13
13
(:require-macros [cljs.macro-test.cljs2852]))
14
14
15
15
(deftest test-macros
28
28
(is (= '([x])) (cljs.macro-test.cljs2852/beta ))
29
29
(is (= '([x] [x y])) (cljs.macro-test.cljs2852/delta ))
30
30
(is (= '([x] [x & xs])) (cljs.macro-test.cljs2852/zeta )))
31
+
32
+ (deftest test-cljs-3027
33
+ (is (= {" a" " b" } (sm-cljs-3027 ))))
Original file line number Diff line number Diff line change 10
10
(:refer-clojure :exclude [==]))
11
11
12
12
(defmacro == [a b]
13
- `(+ ~a ~b))
13
+ `(+ ~a ~b))
14
+
15
+ (defmacro sm-cljs-3027 []
16
+ (sorted-map " a" " b" ))
You can’t perform that action at this time.
0 commit comments