DavidKinder / Inform6

The latest version of the Inform 6 compiler, used for generating interactive fiction games.
http://inform-fiction.org/
Other
204 stars 34 forks source link

Error-check for max property length in v3 #207

Closed erkyrath closed 1 year ago

erkyrath commented 1 year ago

Currently, if you try to create an object property with more than 8 bytes in v3, you get a warning:

Version 3 limit of 4 [word] values per property exceeded (use -v5 to get 32), so truncating property

Exceeding a v3 hardware constraint is usually an error, not a warning. I don't know why this was set up as a warning, but I'd like to change it to an error.

(I suppose it allows you to write an object with a lot of name synonyms, compile the source on either v3 or v5, and get as many synonyms as the format allows. But this is really not how people write games.)

This came up when someone tried to create a v3 game where an object inherited five classes. (Thus accumulating five class values into additive property 2.) Make sure this case throws an error. Also the case of 33 classes in v4+.

Be sure to test non-additive, additive and inherited additive common properties, in v3 and v4+.

Individual properties do not have the 8-byte limit even in v3. I think. Check this.