@@ -1584,7 +1584,10 @@ implementation
olddef:=nil;
is_func:=(token=_FUNCTION);
- consume(token);
+ if token in [_FUNCTION,_PROCEDURE] then
+ consume(token)
+ else
+ consume(_FUNCTION);
pd:=cprocvardef.create(normal_function_level,doregister);
if assigned(sym) then
@@ -0,0 +1,14 @@
+{ %FAIL }
+
+program tb0297;
+{$mode objfpc}
+{$modeswitch functionreferences}
+type
+ TTestProc = procedure;
+ TTestProcRef = reference to TTestProc;
+begin
+end.