mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 19:10:14 +02:00

known at compile time) * adjust error message when a method pointer isn't suitable + add tests
19 lines
223 B
ObjectPascal
19 lines
223 B
ObjectPascal
{ %FAIL }
|
|
|
|
program tprocvar18;
|
|
|
|
{$mode delphi}
|
|
|
|
type C = class
|
|
procedure Foo;
|
|
end;
|
|
procedure C.Foo; begin end;
|
|
type T = procedure of object;
|
|
|
|
var aC: C = nil;
|
|
// Still rejected:
|
|
var ViaInstance: T = aC.Foo;
|
|
|
|
begin
|
|
end.
|