Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002002Core InformExtensionspublic2017-03-12 17:562017-03-14 11:57
Reporterdfremont 
Assigned To 
PrioritynormalSeveritymildReproducibilityalways
StatusconfirmedResolutionopen 
Platformx86OSMac OS XOS Version10.11
Product Version6M62 
Target VersionFixed in Version 
Summary0002002: Numerical use options can't have default value zero
DescriptionIf a numerical use option is given default value zero, Inform doesn't compile the appropriate I6 Constant definition. If the option is used with a positive value, an incorrect Problem message is issued instead. This seems to be because the use option is being treated as if it were a non-numerical one (see example below).

Negative default values fail in the same way. It would be reasonable for these to be forbidden, but in that case they should generate a Problem message instead of an I6 error.
Minimal Source Text To Reproduce
Foo is a room.
Use blah of at least 0 translates as (- Constant BLAH = {N}; -).
[Use blah of at least 1.]
[Use blah.]
Include (- [ foo x; x = BLAH; ]; -).
Additional InformationThe resulting I6 error:

File "/Users/dfremont/Documents/Inform/Projects/test.inform/Build/auto.inf"; Line 36336 # Error: No such constant as "BLAH"

Uncommenting the first comment gives this Problem message:

Problem. You wrote 'Use blah of at least 1' : but that 'Use' option does not have a numerical setting, but is either used or not used.

Instead uncommenting the second comment generates the following I6:

! Use option:
 Constant BLAH = {N};
TagsNo tags attached.
Effect(critical) Inform 6 compiler reports errors for valid code
Attached Files

- Relationships

-  Notes
(0004666)
zarf (developer)
2017-03-14 11:57

Check.

- Issue History
Date Modified Username Field Change
2017-03-12 17:56 dfremont New Issue
2017-03-14 11:57 zarf Note Added: 0004666
2017-03-14 11:57 zarf Status new => confirmed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker