Inline is broken for referenencing the return object for 3.2.x, 3.0.4 and down plus Delphi works as expected.
Original Reporter info from Mantis: jamie @jamie
-
Reporter name: jamie philbrook
Original Reporter info from Mantis: jamie @jamie
- Reporter name: jamie philbrook
Description:
It has been a common practice at least for me to use the INLINE option in Delphi so that a pointer is generated to the return class instance or pointer and it has been working the same way in 3.0.4 until 3.2.0 which has now broke it because it admits the first line of ASM code needed for the reference to the return object, now..
I have stopped converting a large C++ app that is full of reference returns and has been working with 3.0.4 and Delphi, it no longer works due to this error which apparently seems to be ok to some of the DEV's.
I spent a few hours moving the partial converted project over to Delphi now where this still works as expected.
Steps to reproduce:
Function Test(A:integer):Tform1; inline;
Begin
Result.Caption := A.Tostring;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
form1 := Test(1);
end;
The above is just a simplified example of the problem.
3.0.4 works, Delphi works
3.2.0 does not.
you can examine the difference in ASM code, one line Is admitted, the first one that is needed.
Mantis conversion info:
- Mantis ID: 38551
- Version: 3.2.0