Skip to content

Method resolution for overridden variable arity changed as a result of PR #282 #335

@jhubbardnso

Description

@jhubbardnso

#282 changed the way that constructors/functions are resolved in order to address #221. The old behavior looped over all possible methods until a matching method was found; this resulted in the first match of any kind being returned. The updated method still performs the iteration but if it maintains a separate variable for a varargs match and continues looping when a varargs match is found. This is generally fine and if a non-varargs match is found it will stop looping and that will be returned. However if a varargs match is found it continues looping and if it finds another candidate method the first match will be replaced with the last match. To maintain the old behavior when matching varargs methods an if-check should be added and the varargMatch variable should only be written on the first candidate match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions