File tree 2 files changed +10
-3
lines changed
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"
6149
6149
ILookup
6150
6150
(-lookup [coll k] (-lookup coll k nil ))
6151
6151
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))
6155
6157
6156
6158
IFn
6157
6159
(-invoke [coll k]
Original file line number Diff line number Diff line change 1024
1024
(chunk-append b 0 )
1025
1025
(next (chunk-cons (chunk b) nil ))))))
1026
1026
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
+
1027
1032
(comment
1028
1033
1029
1034
(run-tests )
You can’t perform that action at this time.
0 commit comments