|Anonymous | Login | Signup for a new account||2018-07-20 10:58 PDT|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000539||Core Inform||Kinds and type checking||public||2011-02-07 20:04||2014-05-07 07:35|
|Platform||x86||OS||Mac OS X||OS Version||10.6|
|Target Version||Fixed in Version||6L02|
|Summary||0000539: Problem messages states that value cannot have properties, when index says otherwise.|
|Description||The (second) source text below produces the following problem message:|
You wrote 'A behavior has a rule called the turn rule' : but this is a kind of value which is not allowed to have properties of its own, because this would be impossible to store in any sensible way. For instance, 'A scene has a number called difficulty.' is fine because there are not many scenes and I know them all, but 'A number has a text called French translation.' is not allowed, because storing something for every possible number takes an impossible amount of space. (See the Kinds index for which kinds can have properties.)
However, upon looking at the Kinds index as it suggests (after, of course, commenting out the offending line and compiling), I find that my value is indeed allowed properties (a check mark is in fact in every column, because my value is not, as it seems to imply, limitless).
Please also note that if I define my value via table (the first source text), and allow columns to define the properties of the values (barring that rules bug and other bugs with tables), Inform compiles merrily, even allowing empty entries for the properties.
|Minimal Source Text To Reproduce|
[------Compiles------] A behavior is a kind of value. The behaviors are defined by the Table of Behaviors. Table of behaviors behavior stuff Aimless 6 Happy 2 Sad -- When play begins: say the stuff of Aimless. The place is a room. [-------Does not compile--------] A behavior is a kind of value. A behavior has a number called stuff. Aimless is a behavior with a stuff of 6. Happy is a behavior with a stuff of 2. Sad is a behavior. The place is a room.
|Additional Information||Also reproduced on Windows 7, x86.|
|Tags||No tags attached.|
|Effect||(serious) Compiler rejects valid code|
Ron Newcomb (reporter)
edited on: 2011-02-08 13:15
The 2nd example that doesn't compile should read
A behavior is a kind of value. Some behaviors are aimless, happy, and sad.
A behavior has a number called stuff.
The stuff of aimless is 6.
The stuff of Happy is 2.
The place is a room.
but I'll admit it took me awhile to figure that out. The original looks like it should work.
Marking as related to 0000523 for now, as this is getting at the issue at the end of 0000523:0000984 (which is why Ron's workaround works).
|A timing issue. The kind exists but until named values are given for it, Inform doesn't know whether it will be a numerical kind or an enumeration, so it rejects the idea of a property because numerical kinds can't have them. What now happens is that this causes Inform to make the kind an enumeration, and then all's well.|
|2011-02-07 20:04||tustin2121||New Issue|
|2011-02-08 13:14||Ron Newcomb||Note Added: 0000999|
|2011-02-08 13:15||Ron Newcomb||Note Edited: 0000999||View Revisions|
|2011-02-08 13:57||jmcgrew||Priority||high => normal|
|2011-02-08 13:57||jmcgrew||Status||new => acknowledged|
|2011-02-08 14:53||EmacsUser||Note Added: 0001000|
|2011-02-08 14:53||EmacsUser||Status||acknowledged => confirmed|
|2011-02-08 14:53||EmacsUser||Relationship added||related to 0000523|
|2014-01-12 06:09||graham||Note Added: 0002267|
|2014-01-12 06:09||graham||Status||confirmed => resolved|
|2014-01-12 06:09||graham||Resolution||open => fixed|
|2014-01-12 06:09||graham||Assigned To||=> graham|
|2014-05-07 07:34||jmcgrew||Fixed in Version||=> 6L02|
|2014-05-07 07:35||jmcgrew||Status||resolved => closed|
|Copyright © 2000 - 2010 MantisBT Group|