|Anonymous | Login | Signup for a new account||2019-01-23 17:09 PST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000444||Core Inform||Tables||public||2010-11-30 08:03||2014-05-07 07:35|
|Platform||x86||OS||Mac OS X||OS Version||10.6|
|Target Version||Fixed in Version||6L02|
|Summary||0000444: Inform ignores explicit typing for table columns|
|Description||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.|
|Minimal Source Text To Reproduce|
Test is a room. There is a pen in Test. Table of Testing One subject a person yourself -- Table of Testing Two subject_ yourself -- 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.
|Tags||No tags attached.|
|Effect||(serious/mild) Game compiles but misbehaves|
Ron Newcomb (reporter)
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.
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."
|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.|
|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.|
|2010-11-30 08:03||ektemple||New Issue|
|2010-11-30 08:07||EmacsUser||Status||new => confirmed|
|2010-11-30 09:03||jmcgrew||Relationship added||related to 0000446|
|2010-11-30 10:21||Ron Newcomb||Note Added: 0000870|
|2010-11-30 11:07||capmikee||Note Added: 0000872|
|2010-11-30 13:07||EmacsUser||Note Added: 0000873|
|2011-10-22 08:43||graham||Note Added: 0001422|
|2011-10-22 08:43||graham||Status||confirmed => resolved|
|2011-10-22 08:43||graham||Resolution||open => fixed|
|2011-10-22 08:43||graham||Assigned To||=> graham|
|2012-11-15 11:54||EmacsUser||Relationship added||related to 0001049|
|2014-05-07 07:34||jmcgrew||Fixed in Version||=> 6L02|
|2014-05-07 07:35||jmcgrew||Status||resolved => closed|
|Copyright © 2000 - 2010 MantisBT Group|