mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 23:20:29 +02:00
Fix for Mantis #29792.
htypechk.pas, tcallcandidates: * create_candidate_list: check the correct tableoptions for sto_has_overload flag + added test git-svn-id: trunk@33211 -
This commit is contained in:
parent
463c9f6e42
commit
e58488dc3e
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -14977,6 +14977,7 @@ tests/webtbs/tw29669.pp svneol=native#text/plain
|
||||
tests/webtbs/tw29669a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2975.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2976.pp svneol=native#text/plain
|
||||
tests/webtbs/tw29792.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw2983.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2984.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2998.pp svneol=native#text/plain
|
||||
|
@ -2396,7 +2396,7 @@ implementation
|
||||
while assigned(pt) do
|
||||
begin
|
||||
if (pt.resultdef.typ=recorddef) and
|
||||
(sto_has_operator in tabstractrecorddef(pt.resultdef).owner.tableoptions) then
|
||||
(sto_has_operator in tabstractrecorddef(pt.resultdef).symtable.tableoptions) then
|
||||
collect_overloads_in_struct(tabstractrecorddef(pt.resultdef),ProcdefOverloadList,searchhelpers,anoninherited,spezcontext);
|
||||
pt:=tcallparanode(pt.right);
|
||||
end;
|
||||
|
33
tests/webtbs/tw29792.pp
Normal file
33
tests/webtbs/tw29792.pp
Normal file
@ -0,0 +1,33 @@
|
||||
unit tw29792;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
interface
|
||||
|
||||
type
|
||||
{ TMyRecord }
|
||||
|
||||
TMyRecord<T> = record
|
||||
class operator Add(A,B: TMyRecord<T>): TMyRecord<T>;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TMyRecord }
|
||||
|
||||
class operator TMyRecord<T>.Add(A, B: TMyRecord<T>): TMyRecord<T>;
|
||||
begin
|
||||
// add implementation
|
||||
end;
|
||||
|
||||
procedure TestIfCompiles;
|
||||
type
|
||||
TInteger = TMyRecord<Integer>;
|
||||
var
|
||||
N1, N2, N3: TInteger;
|
||||
begin
|
||||
N1 := N2 + N3;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user