I have to deal with this problem when I try to extract a method in an if statement. I could not find the registered error.
procedure TForm1.BitBtn3Click(Sender: TObject); var x: integer; b: boolean; begin if true then x := 8 //********************** i try to extract this line else x := 6; showmessage(inttostr(x)); end;
The result I get:
procedure TForm1.BitBtn3Click(Sender: TObject); var x: integer; b: boolean; begin if true then newMethode else x := 6; showmessage(inttostr(x)); end;
and the new method:
procedure TForm1.newMethode; var x: Integer; begin x := 8; end;
Can anyone check how this happens on Delphi XE? Does anyone know if this has been reported?
Cloudymarble
source share