mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 18:49:16 +02:00
Fix for Mantis #24953.
pgenutil.pas, parse_generic_parameters: * set the typesym of the newly created def so that inline specializations in pexpr.pas, sub_expr can check it correctly git-svn-id: trunk@25410 -
This commit is contained in:
parent
f11b8b5da4
commit
d03507671d
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13512,6 +13512,7 @@ tests/webtbs/tw24865.pp svneol=native#text/pascal
|
|||||||
tests/webtbs/tw24871.pp svneol=native#text/pascal
|
tests/webtbs/tw24871.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2492.pp svneol=native#text/plain
|
tests/webtbs/tw2492.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2494.pp svneol=native#text/plain
|
tests/webtbs/tw2494.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw24953.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2503.pp svneol=native#text/plain
|
tests/webtbs/tw2503.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2504.pp svneol=native#text/plain
|
tests/webtbs/tw2504.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2514.pp svneol=native#text/plain
|
tests/webtbs/tw2514.pp svneol=native#text/plain
|
||||||
|
@ -1009,6 +1009,10 @@ uses
|
|||||||
|
|
||||||
for i:=firstidx to result.count-1 do
|
for i:=firstidx to result.count-1 do
|
||||||
ttypesym(result[i]).typedef:=basedef;
|
ttypesym(result[i]).typedef:=basedef;
|
||||||
|
{ we need a typesym in case we do a Delphi-mode inline
|
||||||
|
specialization with this parameter; so just use the first sym }
|
||||||
|
if not assigned(basedef.typesym) then
|
||||||
|
basedef.typesym:=ttypesym(result[firstidx]);
|
||||||
firstidx:=result.count;
|
firstidx:=result.count;
|
||||||
|
|
||||||
constraintdata.free;
|
constraintdata.free;
|
||||||
|
24
tests/webtbs/tw24953.pp
Normal file
24
tests/webtbs/tw24953.pp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
unit tw24953;
|
||||||
|
|
||||||
|
interface
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
|
Type
|
||||||
|
TPoolablePool<t:class,constructor> = class
|
||||||
|
factory : TObject;
|
||||||
|
constructor create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TPoolableFactory<t>= class
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{ TPoolablePool<t> }
|
||||||
|
|
||||||
|
constructor TPoolablePool<t>.create; // last line visible in -va output before crash
|
||||||
|
begin
|
||||||
|
factory:=TPoolableFactory<t>.create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user