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
That's a simple bug, which I will send a PR for. Not sure if this issue is really necessary but creating just in case.
After trying out .NET 9 preview and nightly builds with Avalonia we have found an issue with some of our JSImport interop methods.
Specifically, this one was acting weird, raising an error "Value is not an integer" each time when third callback parameter had a decimal point.
Additionally, if you change other two argument types to double, it will work as expected.
After that it's enough to call this method, for example:
JsFunc((a,b,c)=>Console.WriteLine($"{a}{b}{c}"))
Expected behavior
Callback parameters should be converted independently from each other. Changing type of second parameter should not affect how third parameter is converter.
Actual behavior
Third parameter is casted to the type of second parameter.
Regression?
Yes, it's a regression compared to .NET 8.
Known Workarounds
Adjust JSImport definition to expect second and third callback parameters to be of the same type.
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered:
Description
That's a simple bug, which I will send a PR for. Not sure if this issue is really necessary but creating just in case.
After trying out .NET 9 preview and nightly builds with Avalonia we have found an issue with some of our JSImport interop methods.
Specifically, this one was acting weird, raising an error "Value is not an integer" each time when third callback parameter had a decimal point.
Additionally, if you change other two argument types to double, it will work as expected.
Reproduction Steps
JS method:
.NET mapping:
After that it's enough to call this method, for example:
Expected behavior
Callback parameters should be converted independently from each other. Changing type of second parameter should not affect how third parameter is converter.
Actual behavior
Third parameter is casted to the type of second parameter.
Regression?
Yes, it's a regression compared to .NET 8.
Known Workarounds
Adjust JSImport definition to expect second and third callback parameters to be of the same type.
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: