[CLJ-1083] Incorrect ArityException message for function names containing -> Created: 09/Oct/12 Updated: 12/Apr/13 |
|
| Status: | Open |
| Project: | Clojure |
| Component/s: | None |
| Affects Version/s: | Release 1.2, Release 1.3, Release 1.4, Release 1.5 |
| Fix Version/s: | Release 1.6 |
| Type: | Defect | Priority: | Minor |
| Reporter: | Alex Nixon | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Attachments: |
|
| Patch: | Code |
| Approval: | Vetted |
| Description |
|
user=> (defn a->b []) Note that the reported function name in the stack trace is "user$a", where it should be "user$a->b" (or some mangled variant thereof?) See discussion here: https://groups.google.com/d/msg/clojure/PVNoLclhhB0/_NWqyE0cPAUJ |
| Comments |
| Comment by Timothy Baldridge [ 26/Nov/12 10:27 AM ] |
|
Fix for this defect. |
| Comment by Timothy Baldridge [ 26/Nov/12 10:30 AM ] |
|
The throwArity now attempts to locate and call clojure.main/demunge. If it finds the function it invokes it and uses the returned string in the error. Otherwise it just throws the actual class name. This results in the following behaviour: user=> (defn a->b []) |