cursive icon indicating copy to clipboard operation
cursive copied to clipboard

Deftype method implementations show false errors in CLJC files when method arity over 1

Open vehvis opened this issue 5 years ago • 3 comments

To reproduce:

  1. Create two namespaces, one in a .clj file and the other in a .cljc file
  2. Place the following definitions into both namespaces:
(defprotocol IFoo
  (foo [this y])
  (bar [this y z]))
(deftype Foo1 [x]
  IFoo
  (foo [this y]
    (+ x y))
  (bar [this y z]
    (+ x y z)))
  1. Note that in the CLJC namespace, the bar method shows an "incorrect arity 2" error but not in the CLJ namespace.

Reproducible on Cursive 1.9.1-2019.3 (but possibly not on 1.8.2, so maybe a regression?).

vehvis avatar Apr 08 '20 14:04 vehvis

This continues to occur (as expected) on 1.9.1-2020.1

vehvis avatar Apr 27 '20 13:04 vehvis

I can't reproduce this on current Cursive. I looked at it after fixing some related problems, so I'm going to optimistically mark this as fixed. Let me know if that's not the case.

cursive-ghost avatar Sep 14 '22 00:09 cursive-ghost

Actually, I did manage to reproduce this and fix it.

cursive-ghost avatar Sep 14 '22 05:09 cursive-ghost