Open ingted opened 3 years ago
My currently workaround:
if (i == parameterInfos.Length)
{
if (matchingMethod == null)
matchingMethod = methodInfo;
else
{
if (mbrs.Length == 2)
{
try
{
var mbr0 = (MethodInfo)mbrs[0];
var mbr1 = (MethodInfo)mbrs[1];
var p0 = mbr0.GetParameters()[0].ParameterType;
var p1 = mbr1.GetParameters()[0].ParameterType;
var p0nm = p0.Name;
var p1nm = p1.Name;
var p0gt0 = p0.GenericTypeArguments[0].Name;
var p0gt1 = p0.GenericTypeArguments[1].Name;
if (p0nm == "FSharpFunc`2" && p1nm == "Cont`2" && p0gt0 == "Unit" && p0gt1 == "Cont`2") { }
else
{
throw new AmbiguousMatchException(
"More than one matching method found0!");
}
}
catch
{
throw new AmbiguousMatchException(
"More than one matching method found1!");
}
}
else
{
throw new AmbiguousMatchException(
"More than one matching method found!");
}
}
}
use if (p0nm == "FSharpFunc2" && p1nm == "Cont
2" && p0gt0 == "Unit" && p0gt1 == "Cont`2") { }
to avoid exception
Hi @Horusiath, do you think this would cover all spawne quotation expression cases?
I found this will not work for complex quotation...
Hi,
spawne with a remote deployment would cause AmbiguousMatchException:
(Because Cont<> has two union cases)
Could anyone provide a hint about how to get a workaround? Thank you!