Bug #6594
openReflexive access to overloaded methods in Saxon 10 on .NET Framework
0%
Description
When attempting to call a non-static method using the clitype:
mechanism in Saxon 10 on .NET Framework, if the method is overloaded (two methods on the class with the same number of arguments), Saxon rejects both overloads saying (in the -TJ trace output)
Arguments cannot be converted to required types
See https://saxonica.plan.io/boards/3/topics/9759?r=9788
The problem is that if the method reference is ambiguous, Saxon calls DotNetExtensionLibrary.getBestFit()
, which assesses the suitablity of each of the supplied arguments, including the first, which should evaluate to an instance of the target class. But the test for this argument in getConversionPreference()
is going to return -1, indicating that no conversion is possible. Specifically, the required type will be DotNetExternalObject, and getPrimitiveType() on this returns StandardNames.XS_ANY_ATOMIC_TYPE, for which there is no entry in the "switch" expression in getConversionPreference()
.
Although this is a significant bug, Saxon 10 on .NET Framework is a bit of a dead end, so the chances of producing a fix are fairly slender.
Please register to edit this issue