mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-25 13:49:29 +02:00
Fix for Mantis #26922.
pgenutil.pas, specialization_init: * don't push the localsymtable if the unit does not have one available + added test (needs manual execution though... :/ ) git-svn-id: trunk@29172 -
This commit is contained in:
parent
865d074c3d
commit
fa1bc0757d
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -14116,6 +14116,7 @@ tests/webtbs/tw26773.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2678.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2690.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2691.pp svneol=native#text/plain
|
||||
tests/webtbs/tw26922.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw2696.pp svneol=native#text/plain
|
||||
tests/webtbs/tw26976.pp svneol=native#text/plain
|
||||
tests/webtbs/tw26993.pp svneol=native#text/plain
|
||||
@ -14875,6 +14876,8 @@ tests/webtbs/uw25598.pp svneol=native#text/plain
|
||||
tests/webtbs/uw25610a.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/uw26922a.pp svneol=native#text/pascal
|
||||
tests/webtbs/uw26922b.pp svneol=native#text/pascal
|
||||
tests/webtbs/uw2706a.pp svneol=native#text/plain
|
||||
tests/webtbs/uw2706b.pp svneol=native#text/plain
|
||||
tests/webtbs/uw2731.pp svneol=native#text/plain
|
||||
|
@ -1321,7 +1321,8 @@ uses
|
||||
if assigned(hmodule.globalsymtable) then
|
||||
symtablestack.push(hmodule.globalsymtable);
|
||||
{ push the localsymtable if needed }
|
||||
if (hmodule<>current_module) or not current_module.in_interface then
|
||||
if ((hmodule<>current_module) or not current_module.in_interface)
|
||||
and assigned(hmodule.localsymtable) then
|
||||
symtablestack.push(hmodule.localsymtable);
|
||||
end;
|
||||
|
||||
|
12
tests/webtbs/tw26922.pp
Normal file
12
tests/webtbs/tw26922.pp
Normal file
@ -0,0 +1,12 @@
|
||||
{ %INTERACTIVE }
|
||||
{ This test requires a change in uw26922a for recompilation which can not be done automatically by
|
||||
simply adding a define, because the compiler won't detect that it needs to recompile that unit }
|
||||
|
||||
program tw26922;
|
||||
|
||||
uses
|
||||
uw26922a, uw26922b;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
28
tests/webtbs/uw26922a.pp
Normal file
28
tests/webtbs/uw26922a.pp
Normal file
@ -0,0 +1,28 @@
|
||||
unit uw26922a;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
unit2_test;
|
||||
|
||||
Type
|
||||
TTestAbstract = class
|
||||
|
||||
end;
|
||||
|
||||
TTest = class;
|
||||
|
||||
TTestObject = class(specialize TTestObjectAbstract<TTest>);
|
||||
|
||||
// Note: uncomment TTestAbstract when for recompilation
|
||||
TTest = class//(TTestAbstract)
|
||||
public
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
20
tests/webtbs/uw26922b.pp
Normal file
20
tests/webtbs/uw26922b.pp
Normal file
@ -0,0 +1,20 @@
|
||||
unit uw26922b;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
Type
|
||||
generic TTestObjectAbstract<T> = class
|
||||
private
|
||||
var
|
||||
FTest : T;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
uw26922a;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user