- - - -
Problem. An internal error has occurred: no such kind in printing-routine. The current sentence is '-- foo after bar' ; the error was detected at line 1741 of "Chapter 22/Compile Invocations.w". This should never happen, and I am now halting in abject failure.
- - - -

Minimal Source Text To Reproduce

There is a room.
When play begins:
if the player is:
-- foo after bar:
do nothing.

Another case, for which it's unclear whether the underlying cause is the same:

- - - -
There is a room.
A person has a relation of rooms to numbers called the priority.
When play begins:
now the priority of yourself relates the location to a random number from one to seven.
- - - -

Fixed. This could only happen in surprisingly rare circumstances, but it basically came down to the fact that case values weren't being fully typechecked, so that a lexical match on the phrase "K after V" was being made even though K and V made no sense. This is all now properly reported.