mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 16:28:24 +02:00
* fix #39673: also resolve the dummy symbol in case this isn't a reuse of the current generic's name
+ added test
This commit is contained in:
parent
98a942a37e
commit
4053d59a2c
@ -644,8 +644,7 @@ implementation
|
||||
end
|
||||
else
|
||||
begin
|
||||
Message(parser_e_no_generics_as_types);
|
||||
def:=generrordef;
|
||||
def:=handle_dummysym(srsym);
|
||||
end;
|
||||
end
|
||||
else if is_classhelper(def) and
|
||||
|
30
tests/webtbs/tw39673.pp
Normal file
30
tests/webtbs/tw39673.pp
Normal file
@ -0,0 +1,30 @@
|
||||
{ %NORUN }
|
||||
|
||||
program tw39673;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}
|
||||
{$else}
|
||||
{$APPTYPE CONSOLE}
|
||||
{$endif}
|
||||
|
||||
uses
|
||||
Types,
|
||||
Classes,
|
||||
contnrs,
|
||||
generics.collections;
|
||||
|
||||
Type tsomeclass =class
|
||||
function readarray:TObjectList;
|
||||
end;
|
||||
|
||||
{ tsomeclass }
|
||||
|
||||
function tsomeclass.readarray: TObjectList;
|
||||
begin
|
||||
result:=nil;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user