Extended RTTI bug with getting methods of records
I am using FPC 3.3.1 and found a problem similar to #40798, but could not fix it similarly by editing `ResolveMethods` and adding the line `FMethods := FDeclaredMethods`, even though it uses `GetMethodList`
I tried to request a list of methods from my record low-level and it succeeded, but with `TRttiContext.GetMethods` I don't get the methods:
```
program Project1;
{$mode OBJFPC}{$H+}{$M+}
{$Modeswitch advancedrecords}
{$APPTYPE CONSOLE}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
Classes,
TypInfo,
Rtti;
type
{$RTTI EXPLICIT
FIELDS([vcPublic])
METHODS([vcPublic,vcPublished])}
TTestRecord=record
fa:integer;
fa2:integer;
public
procedure MyMethod(arg1, arg2: Integer);
end;
TMyMethodDelegate = procedure (S: Pointer; arg1, arg2: Integer);
procedure TTestRecord.MyMethod(arg1, arg2: Integer);
begin
fa := arg1;
fa2 := arg2;
end;
var
rec: TTestRecord;
Len: Integer;
Tbl : PRecordMethodInfoTable;
MethodP: Pointer;
MethodDel: TMyMethodDelegate;
begin
Len:=GetMethodList(TypeInfo(TTestRecord), Tbl, []);
if Len > 0 then
begin
WriteLn('TypInfo Methods: ', Len);
WriteLn(Tbl^[0]^.Name);
rec.fa:=56;
rec.fa2:=78;
MethodP := Tbl^[0]^.CodeAddress;
MethodDel := TMyMethodDelegate(MethodP);
MethodDel(@rec, 12, 34);
writeln(rec.fa, ', ', rec.fa2);
writeln('Extended RTTI Methods: ', Length(TRttiContext.Create(False).GetType(TypeInfo(TTestRecord)).GetMethods));
end;
readln;
end.
```
Output:
```
TypInfo Methods: 1
MyMethod
12, 34
Extended RTTI Methods: 0
```
Also `TRttiRecordMethod` does not implement getting type properties correctly, unlike `TRttiInstanceMethod` (the `CodeAddress` property is not implemented)
issue