Fixed
Details
Assignee
UnassignedUnassignedReporter
Alex MillerAlex MillerApproval
OkPatch
CodePriority
MajorAffects versions
Fix versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Alex Miller
Alex MillerApproval
Ok
Patch
Code
Priority

Affects versions
Fix versions
Created February 13, 2024 at 1:58 AM
Updated April 30, 2024 at 1:08 PM
Resolved April 30, 2024 at 1:08 PM
Problem
When building the method description text for the arity mismatch exception in the NewExpr constructor added in 1.12.0-alpha7, the class name is passed instead of “new” as the constructor’s name.
Symptom
The constructor arity mismatch error is using the “
Invocation of method java.lang.String
" wording, should be constructor:I think this is because it’s looking for “new” but this is the actual constructor name by this point.
Approaches
Pass the string “new” to the methodDescription method when the method is a Constructor instance in the
checkMethodArity
method – NO that method should not know about “new”Make methodNamesConstructor smarter about identifying that a class name and method name being equal signals a constructor – NO that opens up new syntax
Make methodDescription smarter about identifying that a class name and method name being equal signals a constructor
Patch: clj-2835-1.patch
Screened by: Alex Miller