The following code contains two static methods, InRange1 and InRange2. They are equal, except that the latter is labelled “inline”. The former compiles and works well, while the latter generates “Internal error GOUNKEX170” where indicated.
interface
type TestInline = public static class
public
method InRange1(aNum, aLow, aHigh: Integer): Boolean;
method InRange2(aNum, aLow, aHigh: Integer): Boolean; inline;
end;
implementation
method TestInline.InRange1(aNum: Integer; aLow: Integer; aHigh: Integer): Boolean;
begin
exit aLow <= aNum <= aHigh;
end;
method TestInline.InRange2(aNum: Integer; aLow: Integer; aHigh: Integer): Boolean;
begin
exit aLow <= aNum <= aHigh; // <<== Internal error: GOUNKEX170
end;