mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-08 11:01:41 +01:00
* in equal_genfunc_paradefs take care of the fact that typesym might not be assigned for open array parameters, resolves #38012
git-svn-id: trunk@47253 -
This commit is contained in:
parent
5f04bb4a8e
commit
1266afc0d0
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -18499,6 +18499,7 @@ tests/webtbs/tw37926.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw37949.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3796.pp svneol=native#text/plain
|
||||
tests/webtbs/tw37969.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw38012.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3805.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3814.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3827.pp svneol=native#text/plain
|
||||
|
||||
@ -2622,8 +2622,9 @@ implementation
|
||||
function equal_genfunc_paradefs(fwdef,currdef:tdef;fwpdst,currpdst:tsymtable): boolean;
|
||||
begin
|
||||
result:=false;
|
||||
if (sp_generic_para in fwdef.typesym.symoptions) and
|
||||
(sp_generic_para in currdef.typesym.symoptions) and
|
||||
{ for open array parameters, typesym might not be assigned }
|
||||
if assigned(fwdef.typesym) and (sp_generic_para in fwdef.typesym.symoptions) and
|
||||
assigned(currdef.typesym) and (sp_generic_para in currdef.typesym.symoptions) and
|
||||
(fwdef.owner=fwpdst) and
|
||||
(currdef.owner=currpdst) then
|
||||
begin
|
||||
|
||||
14
tests/webtbs/tw38012.pp
Normal file
14
tests/webtbs/tw38012.pp
Normal file
@ -0,0 +1,14 @@
|
||||
{$mode objfpc}
|
||||
|
||||
program test;
|
||||
|
||||
generic procedure DoThis<T>(msg: T);
|
||||
begin
|
||||
end;
|
||||
|
||||
generic procedure DoThis<T>(a: array of T);
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user