'Extract procedure' generates incorrect code for the contents of 'with' block
Original Reporter info from Mantis: rusty_robot
-
Reporter name:
Original Reporter info from Mantis: rusty_robot
- Reporter name:
Description:
When applying 'Extract procedure' to a selection inside a 'with' block, code is extracted as-is, without necessary object access (e.g., 'with &LtPos;object> do' for block or '&LtPos;object>.<>' for every statement).
Additional information:
For example,
with Image1.Canvas do begin
FillRect(ClipRect);
Ellipse(50, 50, 100, 100);
end;
Extract procedure from second and third lines.
procedure NewProc;
begin
FillRect(ClipRect);
Ellipse(50, 50, 100, 100);
end;
//...
with Image1.Canvas do begin
NewProc;
end;
Mantis conversion info:
- Mantis ID: 17648
- Version: 0.9.29 (SVN)