mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 10:28:54 +02:00
Fix for Mantis #26482.
pgenutil.pas, generate_specialization: * also search for the generic type in general if it was previously found in a record/class as there might be a non-generic type (or one with a different number of parameters) defined elsewhere + added test git-svn-id: trunk@28244 -
This commit is contained in:
parent
f0f628798b
commit
856ae9d3cf
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -14000,6 +14000,7 @@ tests/webtbs/tw26408.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw2643.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2645.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2647.pp svneol=native#text/plain
|
||||
tests/webtbs/tw26482.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw2649.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2651.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2656.pp svneol=native#text/plain
|
||||
|
@ -590,6 +590,8 @@ uses
|
||||
found:=searchsym_in_class(tobjectdef(genericdef.owner.defowner),tobjectdef(genericdef.owner.defowner),ugenname,srsym,st,[])
|
||||
else
|
||||
found:=searchsym_in_record(tabstractrecorddef(genericdef.owner.defowner),ugenname,srsym,st);
|
||||
if not found then
|
||||
found:=searchsym(ugenname,srsym,st);
|
||||
end
|
||||
else
|
||||
found:=searchsym(ugenname,srsym,st);
|
||||
|
25
tests/webtbs/tw26482.pp
Normal file
25
tests/webtbs/tw26482.pp
Normal file
@ -0,0 +1,25 @@
|
||||
unit tw26482;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
interface
|
||||
|
||||
type
|
||||
TEnumerator<T> = class
|
||||
end;
|
||||
|
||||
TList<T> = class
|
||||
public
|
||||
type
|
||||
TEnumerator = class(TObject);
|
||||
protected
|
||||
function DoGetEnumerator: TEnumerator<T>;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
function TList<T>.DoGetEnumerator: TEnumerator<T>; // Error: Identifier not found "TEnumerator$1"
|
||||
begin
|
||||
end;
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user