The following test case is distilled down from the real program by stepwise deletion of all code that does not make any change regarding the error message.
Code: Select all
MODULE Types;
TYPE
Actor* = POINTER TO ActorDesc;
ReadyQ* = POINTER TO ReadyQdesc;
ActorDesc* = RECORD
rdyQ*: ReadyQ
END;
ReadyQdesc* = RECORD END;
END Types.
MODULE ReadyQueue;
IMPORT Types;
TYPE Queue* = Types.ReadyQ;
END ReadyQueue.
MODULE SysCall;
IMPORT Types, ReadyQueue;
PROCEDURE RQput*(q: Types.ReadyQ; act: Types.Actor);
END RQput;
END SysCall.
MODULE Kernel;
IMPORT Types, SysCall;
PROCEDURE PutMsg*;
VAR act: Types.Actor;
BEGIN
SysCall.RQput(act.rdyQ, act) (* <= compilation error *)
END PutMsg;
END Kernel.
Commenting out 'Queue* = Types.ReadyQ;' in module ReadyQueue (or not importing the module) resolves the issue. In the real program, I now omit the type definition in ReadyQueue, resorting to directly using 'Types.ReadyQ'.