This is question might be related to Switch-style condition list causes error - bug or not? although that problem appears to be related more to using properties.
But my intentions are the same here: ascertaining if this is a bug or not.
The following code compiles and works as expected:
Lab is a room.
To display it:
if current action is fooing:
say "You tried the fooing action.";
else if current action is barring:
say "You tried the barring action.";
else:
say "You did not try fooing or barring.".
Instead of display-action:
display it.
Fooing is an action applying to nothing.
Fooing is a display-action.
Understand "foo" as fooing.
Barring is an action applying to nothing.
Barring is a display-action.
Understand "bar" as barring.
Bazzing is an action applying to nothing.
Bazzing is a display-action.
Understand "baz" as bazzing.
But this code:
Lab is a room.
To display it:
if current action is:
-- fooing:
say "You tried the fooing action.";
-- barring:
say "You tried the barring action.";
-- otherwise:
say "You did not try fooing or barring.".
Instead of display-action:
display it.
Fooing is an action applying to nothing.
Fooing is a display-action.
Understand "foo" as fooing.
Barring is an action applying to nothing.
Barring is a display-action.
Understand "bar" as barring.
Bazzing is an action applying to nothing.
Bazzing is a display-action.
Understand "baz" as bazzing.
Results in the following compile error:
It seems odd that one works and one doesn’t. Especially when the error has the text “specifically, it has to be an action”, since both fooing and barring are actions.
Am I missing something?
