Result type from lambda's or anonymous method does not match

The following code fails:

  IntegerEx = public record mapped to System.Int32
  end;

  ListEx<T> = public class mapped to System.Collections.Generic.List<T>
  public
    method Sort(Compare: ListComparatorEx<T>);
  end;

  ListComparatorEx<T> = public block (item1,item2: T): IntegerEx;

implementation

method ListEx<T>.Sort(Compare: ListComparatorEx<T>);
begin
  mapped.Sort((item1,item2)->Compare(item1,item2));
end;

constructor Window1;
begin
  InitializeComponent();
  var a := new ListEx<Object>;
  a.Sort(method (item1,item2: Object): IntegerEx
    begin
      result := 1;
    end
    );
  var b: IntegerEx;
  b := 1;
end;

Error 1 (E256) Result type from lambda’s or anonymous method does not match, expected “IntegerEx”, but got “ValueType” C:\Mis archivos\Projects\SendaSoft\Oxygene\Bugs\Bugs 2015.11.25 - 1\WPFApplication1\WPFApplication1\Window1.xaml.pas 45 10 WPFApplication1

I attached project and screenshot.
Bug199.rar (138.5 KB)

Best regards,
Jose A.

Thanks, logged as bugs://73741

bugs://73741 got closed with status fixed.