File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -6149,9 +6149,11 @@ reduces them without incurring seq initialization"
61496149 ILookup
61506150 (-lookup [coll k] (-lookup coll k nil ))
61516151
6152- (-lookup [coll k not-found] (if (number? k)
6153- (-nth coll k not-found)
6154- not-found))
6152+ (-lookup [coll k not-found]
6153+ (cond
6154+ (not ^boolean (.-edit root)) (throw (js/Error. " lookup after persistent!" ))
6155+ (number? k) (-nth coll k not-found)
6156+ :else not-found))
61556157
61566158 IFn
61576159 (-invoke [coll k]
Original file line number Diff line number Diff line change 10241024 (chunk-append b 0 )
10251025 (next (chunk-cons (chunk b) nil ))))))
10261026
1027+ (deftest test-cljs-3124
1028+ (let [t (assoc! (transient []) 0 1 )]
1029+ (persistent! t)
1030+ (is (= :fail (try (get t :a :not-found ) (catch js/Error e :fail ))))))
1031+
10271032(comment
10281033
10291034 (run-tests )
You can’t perform that action at this time.
0 commit comments