We're updating the issue view to help you get more done. 

IllegalArgumentException thrown when defining a var whose value is calculated with a primitive fn.

Description

Note the following stacktrace line numbers are from the latest 1.4-snapshot, though this happens on 1.3 as well.

Example:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 user=> (defn foo ^long [^long x] x) #'user/foo user=> (def x (inc (foo 10))) CompilerException java.lang.IllegalArgumentException: Unable to resolve classname: long, compiling:(NO_SOURCE_PATH:2) user=> (pst) CompilerException java.lang.IllegalArgumentException: Unable to resolve classname: long, compiling:(NO_SOURCE_PATH:2) clojure.lang.Compiler.analyzeSeq (Compiler.java:6444) clojure.lang.Compiler.analyze (Compiler.java:6244) clojure.lang.Compiler.analyze (Compiler.java:6205) clojure.lang.Compiler.analyzeSeq (Compiler.java:6432) clojure.lang.Compiler.analyze (Compiler.java:6244) clojure.lang.Compiler.access$100 (Compiler.java:37) clojure.lang.Compiler$DefExpr$Parser.parse (Compiler.java:492) clojure.lang.Compiler.analyzeSeq (Compiler.java:6437) clojure.lang.Compiler.analyze (Compiler.java:6244) clojure.lang.Compiler.analyze (Compiler.java:6205) clojure.lang.Compiler.eval (Compiler.java:6497) clojure.lang.Compiler.eval (Compiler.java:6459) Caused by: IllegalArgumentException Unable to resolve classname: long clojure.lang.Compiler$HostExpr.tagToClass (Compiler.java:1003) clojure.lang.Compiler$InvokeExpr.getJavaClass (Compiler.java:3474) clojure.lang.Compiler.getMatchingParams (Compiler.java:2304) clojure.lang.Compiler$StaticMethodExpr.<init> (Compiler.java:1510) clojure.lang.Compiler$HostExpr$Parser.parse (Compiler.java:910) clojure.lang.Compiler.analyzeSeq (Compiler.java:6437) clojure.lang.Compiler.analyze (Compiler.java:6244)

Note though that the following works fine:

1 2 user=> (def x (foo (inc 10))) #'user/x

Environment

None

Status

Assignee

Ben Smith-Mannschott

Reporter

Alexander Taggart

Labels

None

Approval

Ok

Patch

Code and Test

Fix versions

Affects versions

Release 1.3

Priority

Critical