mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:06:02 +02:00
* fix for Mantis #26760: apply patch by Ondrej Pokorny to ensure that units referenced by an "in"-clause are recompiled when they have been changed
+ added test (though due to the nature of the bug it needs to be interactive) git-svn-id: trunk@49587 -
This commit is contained in:
parent
cb0f422eb1
commit
924f9466f0
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -18134,6 +18134,7 @@ tests/webtbs/tw2668.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw2669.pp svneol=native#text/plain
|
tests/webtbs/tw2669.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw26749.pp svneol=native#text/pascal
|
tests/webtbs/tw26749.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2676.pp svneol=native#text/plain
|
tests/webtbs/tw2676.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw26760.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw26773.pp svneol=native#text/plain
|
tests/webtbs/tw26773.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2678.pp svneol=native#text/plain
|
tests/webtbs/tw2678.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw26791.pp svneol=native#text/pascal
|
tests/webtbs/tw26791.pp svneol=native#text/pascal
|
||||||
@ -19366,6 +19367,7 @@ tests/webtbs/uw25598.pp svneol=native#text/plain
|
|||||||
tests/webtbs/uw25610a.pp -text svneol=native#text/plain
|
tests/webtbs/uw25610a.pp -text svneol=native#text/plain
|
||||||
tests/webtbs/uw25610b.pp -text svneol=native#text/plain
|
tests/webtbs/uw25610b.pp -text svneol=native#text/plain
|
||||||
tests/webtbs/uw25814.pp svneol=native#text/plain
|
tests/webtbs/uw25814.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/uw26760/uw26760.pp svneol=native#text/pascal
|
||||||
tests/webtbs/uw26922a.pp svneol=native#text/pascal
|
tests/webtbs/uw26922a.pp svneol=native#text/pascal
|
||||||
tests/webtbs/uw26922b.pp svneol=native#text/pascal
|
tests/webtbs/uw26922b.pp svneol=native#text/pascal
|
||||||
tests/webtbs/uw2706a.pp svneol=native#text/plain
|
tests/webtbs/uw2706a.pp svneol=native#text/plain
|
||||||
|
@ -1129,12 +1129,21 @@ var
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
{ check the date of the source files:
|
{ check the date of the source files:
|
||||||
1 path of ppu
|
1 path of sourcefn
|
||||||
2 path of main source
|
2 path of ppu
|
||||||
3 current dir
|
3 path of main source
|
||||||
4 include/unit path }
|
4 current dir
|
||||||
Source_Time:=GetNamedFileTime(path+hs);
|
5 include/unit path }
|
||||||
found:=false;
|
found:=false;
|
||||||
|
if sourcefn<>'' then
|
||||||
|
Source_Time:=GetNamedFileTime(sourcefn)
|
||||||
|
else
|
||||||
|
Source_Time:=-1;
|
||||||
|
if Source_Time<>-1 then
|
||||||
|
hs:=sourcefn
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Source_Time:=GetNamedFileTime(path+hs);
|
||||||
if Source_Time<>-1 then
|
if Source_Time<>-1 then
|
||||||
hs:=path+hs
|
hs:=path+hs
|
||||||
else
|
else
|
||||||
@ -1144,6 +1153,7 @@ var
|
|||||||
if Source_Time<>-1 then
|
if Source_Time<>-1 then
|
||||||
hs:=main_dir+hs;
|
hs:=main_dir+hs;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
if Source_Time=-1 then
|
if Source_Time=-1 then
|
||||||
Source_Time:=GetNamedFileTime(hs);
|
Source_Time:=GetNamedFileTime(hs);
|
||||||
if (Source_Time=-1) then
|
if (Source_Time=-1) then
|
||||||
|
17
tests/webtbs/tw26760.pp
Normal file
17
tests/webtbs/tw26760.pp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ %INTERACTIVE }
|
||||||
|
|
||||||
|
{ Note: to test this, first compile this program, then change something inside
|
||||||
|
unit uw26760 and make sure that it's recompiled (e.g. either by checking
|
||||||
|
the compiler messages or by introducing a compile error) }
|
||||||
|
|
||||||
|
program tw26760;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
uw26760 in 'uw26760/uw26760.pp';
|
||||||
|
|
||||||
|
begin
|
||||||
|
Test;
|
||||||
|
end.
|
||||||
|
|
17
tests/webtbs/uw26760/uw26760.pp
Normal file
17
tests/webtbs/uw26760/uw26760.pp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
unit uw26760;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
procedure Test;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
procedure Test;
|
||||||
|
begin
|
||||||
|
Writeln('test'); a
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user