Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000335Core InformKinds and type checkingpublic2010-10-17 22:362010-10-28 00:31
ReporterNewbot 
Assigned Tograham 
PrioritynormalSeveritycriticalReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSWindowsOS VersionXP
Product Version6E72 
Target VersionFixed in Version6F95 
Summary0000335: Internal error when a description of non-objects passed as parameter into decide phrase.
DescriptionWhen a description variable is passed into a To decide ...: phrase, but it is a description not of an object (e.g. a 'description of persons' or 'description of containers') Inform fails to compile with this internal error: "bad const check-against in run-time type check".
Minimal Source Text To Reproduce
"Debug" by Newbot

Home is a room.

To decide which person is the master (collection - a description of objects):
	decide on the player.
To decide which person is the master person (collection - a description of persons):
	decide on the player.

Instead of waiting:
	let A be the master something;
	let B be the master person something.
Additional InformationThis is only a problem with To decide ...: phrases, not To ...: phrases. For instance, the following compiles and runs:

"Debug" by Newbot

Home is a room.

To conquer the world with (collection - a description of objects): say "Conquered!".
To conquer the person world with (collection - a description of persons): say "Conquered!".

Instead of waiting:
conquer the world with something;
conquer the person world with something.
TagsNo tags attached.
Effect(critical) Compiler reports internal error
Attached Files

- Relationships

-  Notes
(0000728)
graham (administrator)
2010-10-24 02:13

Fixed. The source text is incorrect, and now produces a helpful problem message. The trouble is that "something" is a description of things, not a description of people. It can't, in any safe way, be used as such, because if so then the construction of a list of items it describes would make an unsafe list of people (one that contained other things too, that is). This is why "description of ..." is covariant, not contravariant; it's more like the representation of a set than like the representation of an indicator function.

- Issue History
Date Modified Username Field Change
2010-10-17 22:36 Newbot New Issue
2010-10-18 00:15 jmcgrew Priority low => normal
2010-10-18 00:15 jmcgrew Status new => acknowledged
2010-10-18 08:39 jmcgrew Status acknowledged => confirmed
2010-10-24 02:13 graham Note Added: 0000728
2010-10-24 02:13 graham Status confirmed => resolved
2010-10-24 02:13 graham Resolution open => fixed
2010-10-24 02:13 graham Assigned To => graham
2010-10-25 21:14 jmcgrew Fixed in Version => 6F95
2010-10-28 00:31 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker