Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000037Core InformPropertiespublic2010-06-15 09:362010-07-01 23:07
Assigned Tograham 
Platformx86OSWindowsOS VersionXP
Product Version6E59 
Target VersionFixed in Version6E72 
Summary0000037: An unamed value property (given the same name as the kind of value) cannot be used with "provides the property" conditional
DescriptionCreating a property with the same name as a kind of value results in a error when using the "if X provides the property Y" conditional. This used to work as expected in 5Z71.

The error produced is:

In the sentence 'if the lantern provides the property brightness, say "True."' , it looks as if you intend 'lantern provides the property brightness' to be a condition, but that asks whether something provides something, and in Inform 'to provide' means that an object (or value) has a property attached - for instance, containers provide the property 'carrying capacity'. Here, though, we have a brightness rather than the name of a property.

I would think the phrase 'the property X' makes it clear that the the property and not the kind of value is what is being referenced. This fails the same way regardless of if the property is on a specific thing of a kind of thing.
Minimal Source Text To Reproduce
Brightness is a kind of value. The brightnesses are guttering, weak, radiant and blazing. 
The lantern has a brightness. The lantern is blazing.
The Lab is a room.  The lantern is here.

When play begins:
	if the lantern provides the property brightness, say "True."
Additional InformationI'd love to know if there's a work around that doesn't involve changing the name of the value or the property since I came across this in an unreleased extension that refers to the kind of value (e.g. as phrase arguments) and the property names (used on several different kinds of things) extensively and I'm not looking forward to searching and replacing (not to mention figuring out what to change the name to).

Thank you!
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships

-  Notes
graham (administrator)
2010-06-17 11:55

This was certainly a bug, yes; "the property brightness" refers to the brightness as a noun. Fixed for the next build.

- Issue History
Date Modified Username Field Change
2010-06-15 09:36 dchapes New Issue
2010-06-15 09:37 dchapes Issue Monitored: dchapes
2010-06-15 09:41 jmcgrew Status new => acknowledged
2010-06-15 09:47 jmcgrew Severity mild => serious
2010-06-17 11:55 graham Note Added: 0000023
2010-06-17 11:55 graham Status acknowledged => resolved
2010-06-17 11:55 graham Resolution open => fixed
2010-06-17 11:55 graham Assigned To => graham
2010-06-30 18:07 jmcgrew Fixed in Version => 6E72
2010-07-01 23:07 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker