Skip to content

No matching method for class error when using Clojure 1.12 qualified method syntax #734

@Oddsor

Description

@Oddsor

Since clojure 1.12 hit I figured I'd use some qualified methods, such as String/.split.
Sadly this seems to fail with the following error message:

Execution error (ExceptionInfo) at clojure.tools.analyzer.passes.jvm.validate/validate-call (validate.clj:127).
No matching method: .split for class: class java.lang.String and arity: 2

Usage example:

^{:nextjournal.clerk/visibility {:result :hide}}
(defn to-matrix [input]
  (for [line (String/.split input "\\n")
        :let [numbers (String/.split line "\\s+")]]
    (map parse-long numbers)))

Clerk-version:

io.github.nextjournal/clerk {:git/sha "d9cab25aae62029557cff3346e7bd06e878999cd"
                                             :git/url "https://github.com/nextjournal/clerk"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions