You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a0b466a
Browse filesBrowse the repository at this point in the historyBrowse files
Pack spread varargs arguments into one array argument (#349)
Arguments were matched one-to-one with the method parameters, so a call
to a varargs method with more arguments than parameters indexed past the
parameter list and crashed (`Index 1 out of bounds for length 1`), and a
call with zero or one spread argument was checked against the varargs
parameter as if that argument were the array itself.
When a call passes its trailing arguments individually (the argument
count differs from the parameter count, or the last argument is not a
subtype of the array type and not null), the varargs parameter is now
bound to a fresh array instance whose only refinement is its length
(the number of spread arguments). Refinements on the varargs parameter
are checked against that array; the individual elements are not checked
against anything. Passing an explicit array keeps the one-to-one
mapping. Parameter checking now iterates over the mapped parameters
instead of the arguments.
Fixes#349
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: liquidjava-verifier/src/main/java/liquidjava/processor/refinement_checker/general_checkers/MethodsFunctionsChecker.java
0 commit comments