cursive icon indicating copy to clipboard operation
cursive copied to clipboard

Methods in gen-class erroneously flagged as "cannot be resolved"

Open tafenton opened this issue 10 months ago • 0 comments

Hi,

I work on several applications that use Apache Daemon to run as Windows services; this requires two specific static methods to be defined like so:

(ns my-namespace
  (:gen-class
    :methods [^:static [start ["[Ljava.lang.String;"] void]
              ^:static [stop  ["[Ljava.lang.String;"] void]]))

Cursive adds warning flags to start, stop, and void since can't be resolved, and pops up to that effect during every commit. However, since you can't define a function within a namespace before the ns macro, methods declared this way will never be resolvable. Would a possible solution be to disable this check within the scope of the ns macro?

tafenton avatar Apr 07 '24 12:04 tafenton