Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002132Core InformAssertions and creationspublic2020-05-30 20:112020-05-30 20:11
Reporterotistdog 
Assigned To 
PrioritynormalSeverityseriousReproducibilityalways
StatusnewResolutionopen 
Platformx86OSLinuxOS VersionAny
Product Version6M62 
Target VersionFixed in Version 
Summary0002132: Compiler provides misleading problem message depending on placement of new action declaration
DescriptionThe example code creates a problem message (see "Additional Information") that implies a constant action can't be used as the usual value for a property holding a stored action. However, this message is not produced and the code functions as expected if a new action declaration (for an action used by the line identified in the problem message) is moved before the line in question.

On the whole, there doesn't seem to be much sensitivity to code order at this point in Inform's evolution, so I am not sure whether or not it is intentional that the new action must be declared before code using it. In any case, the problem message does not accurately communicate the nature of the problem, and incorrectly implies that the code cannot be made to work.

This may be better filed under "Actions" but the particular message seems to come from the compiler looking at the creation of a constant stored action, so "Assertions and creations" seemed a better fit. The severity of "serious" is based on the guidance for the associated "effect," assuming that the code is intended to be valid.
Minimal Source Text To Reproduce
"Void Waits"

[Fake-actioning is an action out of world applying to nothing.] [In this position, the code compiles 
and functions as expected.]

The void is a thing.

The null action is always the action of the void fake-actioning.

A koan is a kind of thing.  A koan has a stored action called paradox.

The paradox of a koan is usually the null action.

Trees falling is a koan.

After jumping:
	showme the null action.

After waving hands:
	showme paradox of trees falling.

Fake-actioning is an action out of world applying to nothing. [In this position, a problem message is 
produced.]

Place is a room.

test me with "jump / wave".

Additional InformationThe exact text of the problem message produced is:

Problem. In 'The paradox of a koan is usually the null action' you give a value of the paradox property as 'null action', and while this does make sense as an action, it is a value which exists and changes during play, and which doesn't make sense to use when setting up the initial state of things.
 
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2020-05-30 20:11 otistdog New Issue


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker