Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001099Core InformKinds and type checkingpublic2013-04-06 18:582014-05-07 07:33
Assigned Tograham 
Platformx86OSMac OS XOS Version10.6
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0001099: Callings allows type violations
DescriptionThe value assigned to ``the mechanism'' in the attached source fails its type check, but ``the mechanism'' is not subsequently cleared to the kind's default value. Hence the incongruous output

- - - -
"mechanism" = device: yourself
- - - -
Minimal Source Text To Reproduce
There is a room.
When play begins:
	let foo be the action of the player attacking the player;
	if foo is an actor attacking a device (called the mechanism):
		showme the mechanism;
	showme the mechanism.
Additional InformationOne might be tempted to blame the current calling scope rules for not restricting ``the mechanism'' to the body of the if, but changing them would break callings in negated or compound conditions.
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships
related to 0000799closedgraham Parenthetical "called" annotations are allowed in descriptions passed as arguments 

-  Notes
zarf (developer)
2013-04-07 21:06
edited on: 2013-04-07 21:07


However, this seems to be specific to the stored-action condition. If I try something similar:

if the rock is in a container (called B):
  showme B;
showme B;

...I don't see the same problem; B winds up "nothing".

zarf (developer)
2013-04-07 21:08

(Possibly related to bug 0001100?)
graham (administrator)
2014-02-03 11:44

Fixed. I think only a fairly reckless coder would use the value of "mechanism" after such a failed test, but this was certainly a bug. It now reverts to "nothing", or to some other suitable default value for its kind.

- Issue History
Date Modified Username Field Change
2013-04-06 18:58 EmacsUser New Issue
2013-04-06 18:58 EmacsUser Relationship added related to 0000799
2013-04-07 21:06 zarf Note Added: 0002010
2013-04-07 21:06 zarf Status new => confirmed
2013-04-07 21:07 zarf Note Edited: 0002010 View Revisions
2013-04-07 21:08 zarf Note Added: 0002011
2014-02-03 11:44 graham Note Added: 0002446
2014-02-03 11:44 graham Status confirmed => resolved
2014-02-03 11:44 graham Resolution open => fixed
2014-02-03 11:44 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