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"
56935693
56945694 IFn
56955695 (-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 " )) ))
56995699
57005700 IEditableCollection
57015701 (-as-transient [coll]
Original file line number Diff line number Diff line change 10801080 (persistent! t)
10811081 (is (= :fail (try (get t :a :not-found ) (catch js/Error e :fail ))))))
10821082
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+
10831087(comment
10841088
10851089 (run-tests )
You can’t perform that action at this time.
0 commit comments