Welcome! Please see the About page for a little more info on how this works.

0 votes
in Compiler by

For example:

user=> (import java.util.Map) java.util.Map user=> (definterface Foo (^void foo [^Map map])) user.Foo user=> (deftype Bar [] Foo (foo [this m])) CompilerException java.lang.NoClassDefFoundError: java/lang/Map, compiling:(NO_SOURCE_PATH:3:1) user=> (definterface Foo2 (^void foo2 [^java.util.Map map])) user.Foo2 user=> (deftype Bar2 [] Foo2 (foo2 [this m])) user.Bar2

The attempt to type-hint with just Map fails; you have to use java.util.Map to get a usable interface definition.

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-2269 (reported by glchapman)
...