Skip to content

Commit 4a8970d

Browse files
committed
Correctly coerce to long
1 parent 7cc8365 commit 4a8970d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/refactor_nrepl/find/find_locals.clj

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
[refactor-nrepl.core :as core]
77
[refactor-nrepl.s-expressions :as sexp]))
88

9-
(defn find-used-locals [{:keys [file ^long line ^long column]}]
9+
(defn find-used-locals [{:keys [file line column]}]
1010
{:pre [(number? line)
1111
(number? column)
1212
(not-empty file)]}
1313
(core/throw-unless-clj-file file)
14-
(let [content (slurp file)
14+
(let [line (long line)
15+
column (long column)
16+
content (slurp file)
1517
ast (ana/ns-ast content)
1618
sexp (sexp/get-enclosing-sexp content (dec line) (dec column))
1719
selected-sexp-node (->> ast

0 commit comments

Comments
 (0)