Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001067Core InformPropertiespublic2013-01-22 12:332014-05-07 07:33
Reporterektemple 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version6L02 
Summary0001067: Compiler overzealous in disallowing anonymous references to properties of non-objects
DescriptionThe source code below should compile, but it does not. The compiler chokes on the instruction to set the property of the anonymous figure-name:

"In the sentence 'now the y-offset of F is 10' , you seem to be looking up the 'y-offset' property, but 'figure name' is not allowed to have that property."

There *is* a figure-name with this property, and the compiler should realize this, as it does in the identical case of an object property. Swap in an anonymous object (e.g., the commented code) for the figure-name to see the difference in behavior.
Minimal Source Text To Reproduce
"Test"

Test is a room. A plumb bob is in Test.

Figure of Testing is the file "Testing.png".

The figure of testing has a number called the y-offset.
The plumb bob has a number called the y-offset.

When play begins:
	let F be a random figure-name[thing in Test];
	if F provides the property y-offset:
		now the y-offset of F is 10.
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships

-  Notes
(0002557)
graham (administrator)
2014-03-14 12:06

This has its down-side, but is by design. Typechecking of properties of objects is intentionally weaker, partly because "nothing", the non-object, can validly be an object value, but also because it's easy to implement in a way that's safe at run-time.

- Issue History
Date Modified Username Field Change
2013-01-22 12:33 ektemple New Issue
2013-01-23 08:02 EmacsUser Reproducibility have not tried => always
2013-01-23 08:02 EmacsUser Status new => confirmed
2013-01-23 08:16 EmacsUser Severity mild => serious
2014-03-14 12:06 graham Note Added: 0002557
2014-03-14 12:06 graham Status confirmed => resolved
2014-03-14 12:06 graham Resolution open => fixed
2014-03-14 12:06 graham Assigned To => graham
2014-05-07 07:32 jmcgrew Fixed in Version => 6L02
2014-05-07 07:33 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker