0
Fixed

[W521] False positive when the name of the function is used instead of Result

Anonymous 10 years ago updated by Stephan Plath 10 years ago 4
Function MyFunc:String;
Begin
  MyFunc:='dummy';
End;
problem still exists in 2015.04. Here is some ugly example code:

function GWZ: real;
var k:real;
begin
if m<5 then begin
if g<0.65 then k:=1 else k:=0.71*g+0.54 end
else
if g<0.60 then k:=1 else
if (g>=0.60) and (g<0.83) then k:=(0.52-0.017*m)*g+0.01*m+0.72 else
k:=0.71*g+0.56-0.004*m;
GWZ:=SQR(Tp-Tf)/(2*Tp*(1-g*Tf/Tp))*k;
end;