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 34953495; ; TODO: analyzed analyzed? should take pass name as qualified keyword arg
34963496; ; then compiler passes can mark/check individually - David
34973497
3498+ (defn- unsorted-map? [x]
3499+ (and (map? x)
3500+ (not (sorted? x))))
3501+
34983502(defn analyzed
34993503 " Mark a form as being analyzed. Assumes x satisfies IMeta. Useful to suppress
35003504 warnings that will have been caught by a first compiler pass."
35013505 [x]
35023506 (cond
3503- (map? x) (assoc x ::analyzed true )
3507+ (unsorted- map? x) (assoc x ::analyzed true )
35043508 :else (vary-meta x assoc ::analyzed true )))
35053509
35063510(defn analyzed?
35093513 [x]
35103514 (boolean
35113515 (cond
3512- (map? x) (::analyzed x)
3516+ (unsorted- map? x) (::analyzed x)
35133517 :else (::analyzed (meta x)))))
35143518
35153519(defn- all-values?
Original file line number Diff line number Diff line change 99(ns cljs.macro-test
1010 (:refer-clojure :exclude [==])
1111 (: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 ]])
1313 (:require-macros [cljs.macro-test.cljs2852]))
1414
1515(deftest test-macros
2828 (is (= '([x])) (cljs.macro-test.cljs2852/beta ))
2929 (is (= '([x] [x y])) (cljs.macro-test.cljs2852/delta ))
3030 (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 1010 (:refer-clojure :exclude [==]))
1111
1212(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