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

Unknown return type class throws NPE instead of useful exception

Description

This is a regression from CLJ-1232 - if you specify a return type class that is not fully-qualified or imported, you now get an NPE instead of a useful error message.

1 2 3 4 5 6 ;; 1.7 CompilerException java.lang.IllegalArgumentException: Unable to resolve classname: Closeable, compiling:(NO_SOURCE_PATH:4:1) ;; 1.8 (defn foo ^Closeable []) NullPointerException clojure.core/sigs/resolve-tag--4375 (core.clj:247)

Cause: The new code that resolves classes does not handle the possible null return value of Compiler$HostExpr/maybeClass.

Solution: Check for null and fall back to the original argvecs, which will result in the original message.

Patch: clj-1868.patch

Environment

None

Status

Assignee

Unassigned

Reporter

Alex Miller

Approval

Ok

Patch

Code and Test

Fix versions

Affects versions

Release 1.8

Priority

Major