mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 07:59:27 +02:00
* fix for Mantis #32108: ensure that types are registered once there is no more specialization is going on
git-svn-id: trunk@37341 -
This commit is contained in:
parent
b765d661ce
commit
a1c910d892
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -15781,6 +15781,7 @@ tests/webtbs/tw31945.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3197.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3207.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3210.pp svneol=native#text/plain
|
||||
tests/webtbs/tw32108.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw32111.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw32118.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3212.pp svneol=native#text/plain
|
||||
@ -16435,6 +16436,7 @@ tests/webtbs/uw3179a.pp svneol=native#text/plain
|
||||
tests/webtbs/uw3179b.pp svneol=native#text/plain
|
||||
tests/webtbs/uw3184a.pp svneol=native#text/plain
|
||||
tests/webtbs/uw3184b.pp svneol=native#text/plain
|
||||
tests/webtbs/uw32108.pp svneol=native#text/pascal
|
||||
tests/webtbs/uw3292a.pp svneol=native#text/plain
|
||||
tests/webtbs/uw3340.pp svneol=native#text/plain
|
||||
tests/webtbs/uw3353.pp svneol=native#text/plain
|
||||
|
@ -743,6 +743,10 @@ implementation
|
||||
of the defs in the def list of the module}
|
||||
ttypesym(sym).typedef:=hdef;
|
||||
newtype.typedef:=hdef;
|
||||
{ ensure that the type is registered when no specialization is
|
||||
currently done }
|
||||
if current_scanner.replay_stack_depth=0 then
|
||||
hdef.register_def;
|
||||
{ KAZ: handle TGUID declaration in system unit }
|
||||
if (cs_compilesystem in current_settings.moduleswitches) and
|
||||
assigned(hdef) and
|
||||
|
10
tests/webtbs/tw32108.pp
Normal file
10
tests/webtbs/tw32108.pp
Normal file
@ -0,0 +1,10 @@
|
||||
program tw32108;
|
||||
|
||||
uses uw32108;
|
||||
|
||||
begin
|
||||
if getTFooF <> 1 then
|
||||
Halt(1);
|
||||
Writeln('ok');
|
||||
end.
|
||||
|
34
tests/webtbs/uw32108.pp
Normal file
34
tests/webtbs/uw32108.pp
Normal file
@ -0,0 +1,34 @@
|
||||
unit uw32108;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
interface
|
||||
|
||||
function getTFooF: Integer;
|
||||
|
||||
implementation
|
||||
|
||||
type
|
||||
|
||||
{ TFoo }
|
||||
|
||||
TFoo = class
|
||||
class var f: integer;
|
||||
class constructor Create;
|
||||
end;
|
||||
|
||||
{ TFoo }
|
||||
|
||||
class constructor TFoo.Create;
|
||||
begin
|
||||
f := 1;
|
||||
end;
|
||||
|
||||
function getTFooF: Integer;
|
||||
begin
|
||||
Result := TFoo.f;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user