We have another problem with our Property Wrapper (see Internal Error of the Oxygene Compiler)
We have a Varying Class which wraps a String and adds most of the VMS Pascal Varying string functionality. This class also contains the following implicit casts:
public static implicit operator Varying(string str)
{
return new Varying(str ?? string.Empty);
}
public static implicit operator Varying(char str)
{
return new Varying(str);
}
Then we have the following Wrapper method:
PROCEDURE FKT_Selektion( Sel: Tuple<System.Reflection.PropertyInfo, ToolboxCS.Base.SpezplaStructure>;
Col: Varying;
Val: Varying;
Opc: String := ‘LIKE’ );
begin
var str: Varying := Varying(Sel.Item1.GetValue(Sel.Item2, nil));
FKT_Selektion(var str, Col, Val, Opc);
Sel.Item1.SetValue(Sel.Item2, str, nil);
end;
In the business code there are cases like the following:
DIALOG.DIA_FUNKTIONEN.FKT_Selektion( Op.Var.Selekti, 'ZSTAUS',
'TO_DATE('''+Unendlich+''',''YYYYMMDDhh24miss'')', '=');
But this throws at runtime.
I wrote a little testcase, in C# and Oxygene. It works in C#. But in Oxygene it throws
with the following exception:
Test method ToolboxUnitTestPas.WrapperTest.LTTestTypeDynamicPropertyWrapperTest1 threw exception:
RemObjects.Oxygene.Dynamic.OxygeneBinderException: No overload with these parameters
at CallSite.Target(Closure, CallSite, Type, Object, String, String, Char)
at System.Dynamic.UpdateDelegates.UpdateAndExecute5(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
Unfortunately, the test cases use quite some of our base classes.
I can try to isolate the problem if you need some test code.
~Ff