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

Shouldn't EXACT_MATCH score higher than CUSTOM_CONVERTER_MATCH? #294

Open
oxysoft opened this issue Jan 15, 2021 · 0 comments
Open

Shouldn't EXACT_MATCH score higher than CUSTOM_CONVERTER_MATCH? #294

oxysoft opened this issue Jan 15, 2021 · 0 comments

Comments

@oxysoft
Copy link

oxysoft commented Jan 15, 2021

I noticed something strange about MoonSharp while debugging a bug in our game. Both of these weights for overload resolving are calibrated to 100:

https://github.com/moonsharp-devs/moonsharp/blob/4e748a7a74af04b589af1b3e1aaa2d66d8b36a57/src/MoonSharp.Interpreter/_Projects/MoonSharp.Interpreter.netcore/src/Interop/Converters/ScriptToClrConversions.cs#L9Ohttps://github.com/moonsharp-devs/moonsharp/blob/4e748a7a74af04b589af1b3e1aaa2d66d8b36a57/src/MoonSharp.Interpreter/_Projects/MoonSharp.Interpreter.netcore/src/Interop/Converters/ScriptToClrConversions.cs#L9-L10

Shouldn't an exact match score higher? Otherwise, this can cause ScriptRuntimeException due to argument mismatch (cannot convert X to a CLR Y etc.) when adding custom converters for UserData to UserData. (userdata to another userdata)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant