Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000539Core InformKinds and type checkingpublic2011-02-07 20:042014-05-07 07:35
Reportertustin2121 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSMac OS XOS Version10.6
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000539: Problem messages states that value cannot have properties, when index says otherwise.
DescriptionThe (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 InformationAlso reproduced on Windows 7, x86.
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships
related to 0000523closedgraham Accessing a value through a relation when the kind of this value is declared before the relation causes a programming error 

-  Notes
(0000999)
Ron Newcomb (reporter)
2011-02-08 13:14
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.

(0001000)
EmacsUser (manager)
2011-02-08 14:53

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).

Also, confirmed.
(0002267)
graham (administrator)
2014-01-12 06:09

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.

- Issue History
Date Modified Username Field Change
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
Powered by Mantis Bugtracker