Skip to content

After changing code in a inline function, unit is not recompiled

Original Reporter info from Mantis: Michl @michl1
  • Reporter name: Michl

Description:

In a saved project (a new project dont show this behaviour), the unit is not recompiled when changing an inline function, despite that the unit is marked as changed (indicated by *).

Recompile all (Shift+F9) works.

Steps to reproduce:

new Project empty Form, with a button and a second unit, save it in a seperate directory (or simple use attached zip):

Unit1/Form:

procedure TForm1.Button1Click(Sender: TObject);
begin
  Caption:=IntToStr(Test(1))
end; 

Unit2:
unit Unit2;

{mode objfpc}{H+}

interface

function Test(i: Integer): Integer; inline;

implementation

function Test(i: Integer): Integer; inline;
begin
  Result:=i;
end;

end. 

First run, Caption shows "1"
Now change function Test to:

function Test(i: Integer): Integer; inline;
begin
  Result:=i*10;
end;

Next run, expected Result is now 10, but Caption shows a "1"

Additional information:

Discussion at german forum:
http://www.lazarusforum.de/viewtopic.php?f=5&t=7547

Mantis conversion info:

  • Mantis ID: 25797
  • Build: 44287
  • Platform: All
  • Version: 1.3 (SVN)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information