Hello everyone! I'm working on a framework that remaps all controls native iOS and Android (TMLabel = TLabel in win, UILabel in iOS, TextView in Android, etc). Congratulations to the compiler Jvm, allows me to use a lot of Pascal code in Android, but I found a problem with nested command "with". I built ppcjvm with revision 23596. This is the sample code:
type
TRec1 = record
a: integer;
end;
TRec2 = record
i: integer;
Rec1: TRec1;
end;
TMyClass = class
protected
Data: TRec2;
public
procedure Test;
end;
procedure TMyClass.Test;
var
LocData: TRec2;
begin
with LocData do
Rec1.a := 123;
Log('with: ' + IntToStr(LocData.Rec1.a)); // success, it
shows 123
LocData.Rec1.a := 124;
Log('not with: ' + IntToStr(LocData.Rec1.a)); // success it
shows 124
with Data do
Rec1.a := 123;
Log('with: ' + IntToStr(Data.Rec1.a)); // !!FAIL!!, it
shows 0
Data.Rec1.a := 124;
Log('not with: ' + IntToStr(Data.Rec1.a)); // success it
shows 124
end;