File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -5693,9 +5693,9 @@ reduces them without incurring seq initialization"
5693
5693
5694
5694
IFn
5695
5695
(-invoke [coll k]
5696
- (-nth coll k) )
5697
- ( -invoke [ coll k not-found]
5698
- ( -nth coll k not-found ))
5696
+ (if ( number? k )
5697
+ ( -nth coll k)
5698
+ ( throw ( js/Error. " Key must be integer " )) ))
5699
5699
5700
5700
IEditableCollection
5701
5701
(-as-transient [coll]
Original file line number Diff line number Diff line change 1080
1080
(persistent! t)
1081
1081
(is (= :fail (try (get t :a :not-found ) (catch js/Error e :fail ))))))
1082
1082
1083
+ (deftest test-cljs-3317
1084
+ (testing " persistent vector invoke matches clojure"
1085
+ (is (thrown-with-msg? js/Error #"Key must be integer" ([1 2 ] nil )))))
1086
+
1083
1087
(comment
1084
1088
1085
1089
(run-tests )
You can’t perform that action at this time.
0 commit comments