Out qualifier
Original Reporter info from Mantis: alexvins
-
Reporter name: Alexander Shishkin
Original Reporter info from Mantis: alexvins
- Reporter name: Alexander Shishkin
Description:
If same variable used as value and out parameter in 3.0.1 it cleared before function call and nothing passed into function.
Following code works in 2.6.4 but fails with 3.0.1
Steps to reproduce:
program project1;
uses
sysutils;
procedure test(p1: AnsiString; out p2: AnsiString; out p3: AnsiString);
begin
if p1 <> 'test' then raise Exception.Create('p1 ='+p1);
p2 := 'p2';
p3 := 'p3';
end;
var
s, s1: AnsiString;
begin
s := 'test';
test(s, s1, s);
end.
Mantis conversion info:
- Mantis ID: 28390
- Version: 3.0.1
- Fixed in version: 3.1.1
- Fixed in revision: 31201 (#9118146b)