htypechk.pas, tcallcandidates: * create_candidate_list: check the correct tableoptions for sto_has_overload flag + added test git-svn-id: trunk@33211 -
@@ -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;
@@ -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;
+ TInteger = TMyRecord<Integer>;
+var
+ N1, N2, N3: TInteger;
+ N1 := N2 + N3;
+end.