namespace OxgeneneLib;
interface
type
TMyRecord = record
x,y,z : Integer;
end;
Class1 = public class
private
var myrec : TMyRecord ;
public
method Test1();
begin
Console.WriteLine( 'Test1 Passed' ) ;
end;
// calling this method fails on Xmarin Android:
// System.BadImageFormatException: 'Expected value type but got type kind 22'
method Test2();
begin
with myrec do begin
end;
Console.WriteLine( 'Test2 Passed') ;
end;
end;
implementation
end.
Calling this class form Xamarin Android causes: System.BadImageFormatException: 'Expected value type but got type kind 22. Bug relates to the existence of “with [record type var] do” statement. With a statement on classes seems to works fine class.
I understand that bug is rather on Mono/Xamiarin side, however, that must be something specific to Oxygene which confuses Mono/Xamarin/Android toolchain.