Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method ambiguity when LAMBDA is used #548

Open
wysohn opened this issue Apr 28, 2023 · 1 comment
Open

Method ambiguity when LAMBDA is used #548

wysohn opened this issue Apr 28, 2023 · 1 comment
Labels
bug Entire or partly plugin is not working as intended. domain:compatibility Plugin is not compatible with external system package:core Related to share domain nor script interpreter priority:medium

Comments

@wysohn
Copy link
Member

wysohn commented Apr 28, 2023

When LAMBDA expression is used, and there is an overloaded method where both the original and the overloaded method accepts the functional interface, then it cannot distinguish which one to use.

For example,

runTask(Plugin plugin, Runnable task)

and

runTask(Plugin plugin, Consumer<BukkitTask> task)

is overloaded method, and both Runnable and Consumer are functional interface. For now, I believe TRG always choose the first method if there are more than one method with the similar signature.

@wysohn wysohn added the bug Entire or partly plugin is not working as intended. label Apr 28, 2023
@wysohn wysohn added domain:compatibility Plugin is not compatible with external system package:core Related to share domain nor script interpreter priority:medium and removed bug Entire or partly plugin is not working as intended. labels Aug 10, 2023
@wysohn wysohn added the bug Entire or partly plugin is not working as intended. label Sep 9, 2023
@wysohn
Copy link
Member Author

wysohn commented Sep 16, 2023

This requires re-structuring how the parser is parsing the IDs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Entire or partly plugin is not working as intended. domain:compatibility Plugin is not compatible with external system package:core Related to share domain nor script interpreter priority:medium
Projects
Development

No branches or pull requests

1 participant