I found that procedure pointers can't be compared if their types was declared separately:

MODULE A;

TYPE

Proc = PROCEDURE;

PROCEDURE Test1 (): BOOLEAN;

VAR

P1, P2: PROCEDURE;

BEGIN

RETURN P1 = P2; (* ok *)

END Test1;

PROCEDURE Test2 (): BOOLEAN;

VAR

P1: PROCEDURE;

P2: PROCEDURE;

BEGIN

RETURN P1 = P2; (* error *)

END Test2;

PROCEDURE Test3 (): BOOLEAN;

VAR

P1: Proc;

P2: Proc;

BEGIN

RETURN P1 = P2; (* ok *)

END Test3;

END A.

Is it possible to fix it?