I was doing some mad science in Inform 7 6M62, and I got an unusual compiler error:
Inform 6.33N for Linux (30th August 2015)
...
File "auto.inf"; Line 11058 # *** Compiler error: SR error: emitter stack empty
What does this error mean? It is generated when compiling to both Z-Machine and Glulx.
Attempting to compile the same code to Z with Inform 6.41 produces a different error message for the same line:
File "auto.inf"; Line 11057 # Error: No expression between brackets '(' and ')'
This is not a fatal error, so compilation finishes. However, after compiling to Z with 6.33N, RTEs such as the following appear:
[** Programming error: object#46 (object number 46) has a property p17_specialproperty, but it is longer
than 2 bytes so you cannot use "." to read **]
This RTE does not occur if compiling to Glulx under 6.33N.
The source of the error seems to be being generated by the following declaration:
Class K16_vessel
class K5_container
with parse_name Parse_Name_GV93
with plural BC_72
with p15_liquid_capacity 0
with p16_current_level 0
with p17_specialproperty specialroutine() ! suspect line
with description BC_73
with initial BC_74
with list_together BC_75
with short_name BC_76
with article BC_77
;
which certainly looks like illegal code given that the routine in question can’t be executed at compile time. (This was the result of the I7 compiler doing its best to deal with the nonsense I fed it. It’s not an I7 compiler issue – I had to work hard to cause this problem.)
Am I correct in thinking that the above should be illegal I6 code?