anchor.diff:  end;
   
   
  -class method EcmaScriptObjectWrapper.FindAndCallBestOverload(methods: List<MethodBase>;  root: GlobalObject;  methodName: String;
  -                   &self: Object;  parameters: array of Object): Object;
  +class method EcmaScriptObjectWrapper.FindAndCallBestOverload(methods: List<MethodBase>;  root: GlobalObject;  methodName: String;  &self: Object;  parameters: array of Object): Object;
   begin
     var lMethods := methods;
   
  -  for i: Int32 := 0 to length(parameters)-1 do begin
  -    // This code is similar to the one used in .ConvertTo
  -    // However it cannot be moved there because we have to determine target value types before converting to them
  -    with matching objectWrapper := EcmaScriptObjectWrapper(parameters[i]) do begin
  -      parameters[i] := objectWrapper.Value; // if these were wrapped before, we should unwrap
  -      continue;
  -    end;
  -
  -    with matching scriptObject := EcmaScriptObject(parameters[i]) do begin
  -      if scriptObject.Class <> 'Date' then begin
  -        parameters[i] := coalesce(scriptObject.Value, parameters[i]);
  -        continue;
  -      end;
  -
  -      if scriptObject.Value.GetType() = typeOf(DateTime) then
  -        parameters[i] := DateTime(scriptObject.Value).ToLocalTime()
  -      else
  -        parameters[i] := GlobalObject.UnixToDateTime(Convert.ToDouble(scriptObject.Value)).ToLocalTime()
  -    end;
  -  end;
  +  for i: Int32 := 0 to length(parameters)-1 do
  +    parameters[i] := EcmaScriptObjectWrapper.UnwrapValue(parameters[i]);
   
     FindBestMatchingMethod(lMethods, parameters);
   
  -  if  (lMethods.Count > 1)  then
  -    root.RaiseNativeError(NativeErrorType.TypeError,String.Format( RemObjects.Script.Properties.Resources.Ambigious_overloaded_method_0_with_1_parameters, methodName, parameters.Length));
  -
  -  if  (lMethods.Count = 0)  then
  -    root.RaiseNativeError(NativeErrorType.TypeError,String.Format( RemObjects.Script.Properties.Resources.No_overloaded_method_0_with_1_parameters, methodName, parameters.Length));
  +  if lMethods.Count > 1 then
  +    root.RaiseNativeError(NativeErrorType.TypeError, String.Format(RemObjects.Script.Properties.Resources.Ambigious_overloaded_method_0_with_1_parameters, methodName, parameters.Length));
  +
  +  if lMethods.Count = 0 then
  +    root.RaiseNativeError(NativeErrorType.TypeError, String.Format(RemObjects.Script.Properties.Resources.No_overloaded_method_0_with_1_parameters, methodName, parameters.Length));
   
     var lMeth := lMethods[0];
     var lParams := lMeth.GetParameters();
  
positive.code: end;
  
  
  class method EcmaScriptObjectWrapper.ConvertTo(value: Object;  &type: &Type): Object;
  begin
    // Undefined -> Double is Double.NaN, not just nil
  
negative.code:     property Value: Object read fValue; reintroduce;
      property &Static: Boolean read fValue = nil;
  
      class method UnwrapValue(value: Object): Object;
      class method IsCompatibleType(sourceType: &Type;  targetType: &Type): Boolean;
      class method ConvertTo(value: Object;  &type: &Type): Object;
      class method FindAndCallBestOverload(methods: List<MethodBase>;  root: GlobalObject;  methodName: String;  &self: Object;  parameters: array of Object): Object;
  