Consider this program:
{$APPTYPE CONSOLE} uses System.SysUtils; procedure Foo; begin end; type TProcedure = procedure; const FooConst: TProcedure =
I believe that this is a compiler bug and have submitted a QC report: QC#127814.
As a work around you can use either of the following:
addr()
@
@FooVar
@FooConst
Pointer
Pointer(@FooVar)