Affects Version/s: None
Fix Version/s: Release 1.6
Patch:Code and Test
The compiler tries to emit jvm native instanceof expressions for direct clojure.core/instance? calls.
For that, it tries to resolve its first argument as a class name. However, it disregards lexical bindings when doing that.
This is incongruent to the default implementation in core.clj
[Stu] All three patches should be applied IMO.
- 0002 makes instance? respect lexical bindings
- 0003 makes instance?'s compiled form check arity, consistent with higher-order behavior
- 0001 has a minimal test for both 0002 and 0003.
This was discovered because the same compiler macro also omits the arity check implicit in the default definition. This could also conveniently be fixed when touching that method:
EDIT elaborated on ticket title and description; added tangent