MantisBT - Core Inform
View Issue Details
0000444Core InformTablespublic2010-11-30 08:032014-05-07 07:35
x86Mac OS X10.6
(serious/mild) Game compiles but misbehaves
0000444: Inform ignores explicit typing for table columns
When you explicitly define a table-column as a subkind of object, Inform sets the datatype as simply "object" regardless of what type was specified, whereas when Inform infers a subkind based on the contents of the column, the column is typed as the most restrictive kind that embraces all objects in the column. The source code provided demonstrates both cases.
Test is a room. There is a pen in Test.

Table of Testing One
a person

Table of Testing Two

When play begins:
   say "Now trying to add the pen to the explicitly typed subject column.";
   choose a blank row in the Table of Testing One;
   now the subject entry is the pen;
   say " It worked!";
   say "Now trying to add the pen to the implicitly typed subject_ column.";
   choose a blank row in the Table of Testing Two;
   now the subject_ entry is the pen.
No tags attached.
related to 0000446closed graham Inform rejects kinds other than object, number, text, and indexed text in parenthetical table column typing 
related to 0001049closed graham The phrase "X is a C listed in T" is inexplicably sexist 
Issue History
2010-11-30 08:03ektempleNew Issue
2010-11-30 08:07EmacsUserStatusnew => confirmed
2010-11-30 09:03jmcgrewRelationship addedrelated to 0000446
2010-11-30 10:21Ron NewcombNote Added: 0000870
2010-11-30 11:07capmikeeNote Added: 0000872
2010-11-30 13:07EmacsUserNote Added: 0000873
2011-10-22 08:43grahamNote Added: 0001422
2011-10-22 08:43grahamStatusconfirmed => resolved
2011-10-22 08:43grahamResolutionopen => fixed
2011-10-22 08:43grahamAssigned To => graham
2012-11-15 11:54EmacsUserRelationship addedrelated to 0001049
2014-05-07 07:34jmcgrewFixed in Version => 6L02
2014-05-07 07:35jmcgrewStatusresolved => closed

Ron Newcomb   
2010-11-30 10:21   
Possibly related:

I submitted a bug report (long before Mantis existed) that when type was inferred from Bob, the column was set to type Man rather than Person. (Likewise for Janet: Woman rather than Person.) Since a person is almost always one or the other, a special case was added to infer Person rather than Man/Woman.
2010-11-30 11:07   
An additional quirk of this situation is that incompatible subtypes of object may be declared, but they will not match as "listed in" the table. I'm not sure why declaring an incompatible object in a table would not cause a compile-time error.


Test is a room. There is a pen in test.

Table of Conversation

Table of Specific Conversation

When play begins:
if pen is a subject listed in Table of Specific Conversation:
say "This bug has been fixed!";
say "This story compiled, but it doesn't work as expected."
2010-11-30 13:07   
Not matching as listed in makes sense because the generated I6 requires the right kind before it will even check for a match. On the other hand, the source you give is either accepted wrongly or miscompiled; I've split off 0000448.
2011-10-22 08:43   
Fixed. The specification here is: if you write an explicit kind name, then that's the kind; otherwise Inform infers it from the initial contents, but "rounds up" to object if the result is a kind of object.