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

Catch an overflowing common property #208

Closed erkyrath closed 1 year ago

erkyrath commented 1 year ago

We now check this limit for v3 (8 bytes) and v4+ (64 bytes).

We previously checked only the 64-byte limit, ignoring Z-machine version. In v3, there used to be an 8-byte check, but this was only a warning and missed the additive case. Now we check the 8-byte limit for v3, both additive and non-additive, and throw an error.

This also catches the case of too many classes in an object's inheritance list. (Because the list is additive property 2.)

Fixes https://github.com/DavidKinder/Inform6/issues/207 .

Test case: added a MAX_COMMON_PROP_SIZE test to https://github.com/erkyrath/inform6-testing .