Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect defmulti definition causes parsing error and wrong position reporting #1720

Closed
mpenet opened this issue Jun 16, 2022 · 0 comments
Closed

Comments

@mpenet
Copy link

mpenet commented Jun 16, 2022

[ To keep development of this project going, consider sponsoring. If you are
already a sponsor, thank you! ]

version

clj-kondo v2022.05.31

problem

When the user defines an incomplete defmulti form the parser cannot complete parsing the file and reports a cryptic error flagging 0:0 position

repro

create a foo.clj file

(ns foo)
(defmulti bar) ; notice it's missing the dispatch val

run clj-kondo against it and you will get

foo.clj:0:0 error: Can't parse ./foo.clj, No implementation of method: :tag of protocol: #'clj-kondo.impl.rewrite-clj.node.protocols/Node found for class: nil
@borkdude borkdude added this to Needs triage in clj-kondo via automation Jun 16, 2022
@borkdude borkdude moved this from Needs triage to High priority (next release) in clj-kondo Jun 16, 2022
@borkdude borkdude moved this from High priority (next release) to Medium priority (new / enhance) in clj-kondo Jun 20, 2022
@borkdude borkdude moved this from Medium priority (new / enhance) to In progress in clj-kondo Nov 2, 2022
clj-kondo automation moved this from In progress to Done Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
clj-kondo
  
Done
Development

No branches or pull requests

2 participants