The patch http://hg.blaise.ru/public/fpc/rev/0a8aff8d8273 (attached) fixes the following: -------8<-------
{$Mode Delphi}
type R = record
var X: Integer;
function Foo: Integer;
end;
function R.Foo: Integer;
begin
result := X
end;
var F: function : Integer of object;
Z: R = (X:42);
begin
// EXPECTED: gets compiled
// ACTUAL: 'Error: Incompatible types'
F := Z.Foo;
writeln( F() = 42 )
end.
-------8<-------The patch does not check for m_delphi: I did not came up with a case where that would make a semantic difference.
βþ
