If the code in Evaluate calls a method, which is also included in an interface, an AmbiguousMatchException is thrown.
Eval works fine.
public interface IFormOwner
public method SetProperty(symProperty as symbol, uValue as usual) as int strict
end interface
public class Test implements IFormOwner
public method SetProperty(symProperty as symbol, uValue as usual) as int strict
return 1
end class
function GetTest() as Test
return Test{}
function ConvertToSymbol (u as usual) as usual
return AsSymbol(u)
function Start() as void strict
var cb1 := {||GetTest():SetProperty(ConvertToSymbol('x'), -1)}
var res1 := Eval(cb1)
Console.WriteLine(ie"{res1}")
Console.ReadLine()
var cs2 := "{||GetTest():SetProperty(ConvertToSymbol('x'), -1)}"
var cb2 := Evaluate(cs2)
var res2 := Eval(cb2)
Console.WriteLine(ie"{res2}")
return
If the code in Evaluate calls a method, which is also included in an interface, an AmbiguousMatchException is thrown. Eval works fine.
XSharpTests.zip