Skip to content

Conversation

@rcosta358
Copy link
Collaborator

@rcosta358 rcosta358 commented Oct 20, 2025

Updated MethodsFunctionsChecker and OperationsChecker to include the number of arguments when calling rtc.getContext().getFunction. This change improves function refinement resolution by distinguishing overloaded methods based on their parameter count.
Also added a test case, by @rodrigomilisse, which previously threw the exception "Cannot invoke "liquidjava.processor.context.RefinedFunction.getArguments()" because "f" is null", since it was invoking the wrong method with no parameters.

This can be improved in the future by distinguishing methods not only by parameter count but also by parameter types.

Co-Authored-By: Márcio Caetano <153174341+rodrigomilisse@users.noreply.github.com>
@rcosta358 rcosta358 added the enhancement New feature or request label Oct 20, 2025
Copy link
Collaborator

@alcides alcides left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@rcosta358 rcosta358 merged commit 7bb6d67 into liquid-java:main Oct 29, 2025
1 check passed
@rcosta358 rcosta358 deleted the method-overloading branch October 29, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants