Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000517Core InformPropertiespublic2011-01-20 17:152014-05-07 07:35
ReporterNYKevin 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSWindowsOS Version7
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000517: A kind "has a number" causes problems with the standard rules
DescriptionIf a kind "has a number" which is not named, it causes problems throughout the Standard Rules, wherever the construction "number of things" (or in one case, "number of [...] things") occurs in the SR.

As a workaround, the number can be named, but since unnamed variables are allowed and accessible, this shouldn't be necessary unless the author needs multiple number variables within a kind.

Because this workaround is readily available, I marked this mild, but I am unfamiliar with practice here, so if that's wrong please correct it.
Minimal Source Text To Reproduce
"Reduced testcase"

A foo is a kind of thing.  A foo has a number.
The Bar is a room.
Additional InformationAlso observed under 6F95 (same platform, same testcase).
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships
related to 0001115closedgraham Naming a property after an existing kind causes the standard rules to produce errors. 

-  Notes
(0000976)
jmcgrew (administrator)
2011-01-21 12:40

One might argue that the code should be considered invalid (making this a "compiler accepts invalid code" issue) since any use of the property would inevitably conflict with the "number of ___" syntax.

On the other hand, "number of ___" is only used with a description and the property would only be used with a specific object, so it seems like the compiler ought to be able to tell them apart, making the code valid.

So I'm not sure if this is the right effect (perhaps Graham can clarify), but I've changed the severity since we do try to keep it strictly in line with the effect for Core Inform issues.
(0000977)
NYKevin (reporter)
2011-01-22 00:14
edited on: 2011-01-22 00:15

Since you can have (this is paraphrased from the documentation, from memory, and might not work exactly right):

Brightness is a kind of value.
The Brightnesses are guttering, weak, fair, radiant, and blazing.
A lamp is a kind of thing. A lamp has a brightness.

If that last sentence is allowed, it would be inconsistent to disallow:

A lamp has a number.

But disallowing "A lamp has a brightness" would annoy a lot of people, and if the "has a number" thing can't be fixed (or won't be fixed), inconsistency may be the only option.

(0001500)
graham (administrator)
2011-12-17 17:25

No good can come of allowing this, so a problem message has been added for using "has a number." or "has a text." I think this is sensible since it gives Inform an opportunity to explain what the user should have typed - it's unlikely, I think, that anyone will actually have intended a nameless number property as such.

- Issue History
Date Modified Username Field Change
2011-01-20 17:15 NYKevin New Issue
2011-01-21 12:40 jmcgrew Note Added: 0000976
2011-01-21 12:40 jmcgrew Severity mild => serious
2011-01-21 12:40 jmcgrew Status new => acknowledged
2011-01-21 12:40 jmcgrew Category Kinds and type checking => Properties
2011-01-22 00:14 NYKevin Note Added: 0000977
2011-01-22 00:15 NYKevin Note Edited: 0000977 View Revisions
2011-01-23 18:18 EmacsUser Status acknowledged => confirmed
2011-12-17 17:25 graham Note Added: 0001500
2011-12-17 17:25 graham Status confirmed => resolved
2011-12-17 17:25 graham Resolution open => fixed
2011-12-17 17:25 graham Assigned To => graham
2013-05-21 11:23 zarf Relationship added related to 0001115
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