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

Error "Can't refer to qualified var that doesn't exist" should name the bad symbol

Description

Def of var with a ns that doesn't exist will yield this error:

1 2 3 user> (def foo/bar 1) Syntax error compiling def at (REPL:1:1). Can't create defs outside of current ns

Cause: Compiler.lookupVar() returns null if the ns in a qualified var does not exist yet.

Proposed: The error message would be improved by naming the symbol and throwing a CompilerException with file/line/col info. It's not obvious, but this may be the only case where this error occurs. If so, the error message could be more specific that the ns is the part that doesn't exist.

Patch: clj-1400-4.diff

Screened by: Alex Miller

Environment

OS X

Status

Assignee

Unassigned

Reporter

Howard Lewis Ship

Labels

Approval

Incomplete

Patch

Code and Test

Fix versions

Affects versions

Release 1.5

Priority

Minor