[CLJ-1107] 'get' should throw exception on non-Associative argument Created: 13/Nov/12 Updated: 13/Nov/12
|Reporter:||Stuart Sierra||Assignee:||Stuart Sierra|
|Patch:||Code and Test|
The implementation of clojure.core/get returns null if its argument is not a valid associative collection. However, calling 'get' on something which is neither nil nor an Associative collection is almost certainly a bug, and should be indicated by an exception.
This behavior can obscure common programmer errors such as:
Attached patch 0001 throws an IllegalArgumentException as the fall-through case of RT.getFrom.