curiousdannii-testing / inform7-imported-bugs

0 stars 0 forks source link

[I7-1982] [Mantis 2018] The compiler crashes with Error 10 when an if statement in an after rule has a simple syntax error #102

Closed curiousdannii-testing closed 2 years ago

curiousdannii-testing commented 2 years ago

Reported by : econrad

Description :

If a simple "if" condition in an "after" rule is terminated with semicolon (, instead of a colon (, the Inform7 compiler will crash with saying "Translating the Source - Failed " with compiler error 10.

Steps to reproduce :

"test" by Eric Conrad

Erewhon is a room.

The widget is a thing.  The widget is here.  The widget can be unused.  The widget is unused.

After taking the widget:
    if the widget is unused;
        say "foo";

Additional information :

The "after" rule was of course incorrect – the syntactically correct code is:

After taking the widget:
if the widget is unused: [ instead of ;]
say "foo";

imported from: [Mantis 2018] The compiler crashes with Error 10 when an if statement in an after rule has a simple syntax error
  • status: Closed
  • resolution: Duplicate
  • resolved: 2022-04-10T04:47:36+10:00
  • imported: 2022/01/10
curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by econrad :
The issue is more general than just the "after" clause. For example, the following code has the same syntax error and also crashes with Error 10:

"bugtester" by Eric Conrad

Bug Spray is a room.

The roach is an animal in Bug Spray. The roach can be red or blue. The roach is blue.

Stepping on is an action applying to one visible thing. Understand "step on [something]" as stepping on.

Before stepping on the roach:
if the roach is blue; [note semicolon here]
say "boo!"

curiousdannii-testing commented 2 years ago

61eedb62875fc10070240916:

Duplicate of Mantis 2070