Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000033Core InformPhrases and functional programmingpublic2010-06-14 13:252010-07-01 23:07
Assigned Tograham 
Platformx86OSMac OS XOS Version10.6
Product Version6E59 
Target VersionFixed in Version6E72 
Summary0000033: To say phrases with text as variables can't be called
DescriptionThe compiler accepts to say phrases that have text or indexed text as variables (To say foo (x - some text)...) but trying to call them results in a compiler error. This doesn't affect to-phrases (To foo (x - some text)...)
Minimal Source Text To Reproduce
To say foo (x - some text):
	say "foo [x]".
To bar (x - some text):
	say "bar [x]".

When play begins:
	say foo "test"; [this line throws a compiler error; removing it compiles the rest of the code 
	bar "test".
Lab is a room.
Additional InformationWorks as expected in 5Z71.
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships

-  Notes
jmcgrew (administrator)
2010-06-15 09:22

The problem message seems somewhat confused...

I was trying to match one of these phrases:

1. say "foo "test" - text"

2. say "[foo "test" - number]"

3. say "[foo "test" - unicode character]"

4. say "[foo "test" - sayable value]"

This was what I found out:

foo "test" = something unrecognised
graham (administrator)
2010-06-15 15:37

Fixed. This sort of definition is perhaps questionable - To say... definitions are really intended for text substitutions, and those aren't really meant to have text parameters, because literal text couldn't be used in them. So I'm not sure it was serious.

It failed because of a misguided optimisation in the parsing machinery, which discarded uses of "say" with exactly one textual parameter when matching against a say phrase other than To say (T - text); it should have been more careful.

- Issue History
Date Modified Username Field Change
2010-06-14 13:25 Juhana New Issue
2010-06-14 17:07 jmcgrew Severity mild => serious
2010-06-14 17:07 jmcgrew Status new => acknowledged
2010-06-15 09:18 jmcgrew Status acknowledged => confirmed
2010-06-15 09:22 jmcgrew Note Added: 0000003
2010-06-15 15:37 graham Note Added: 0000007
2010-06-15 16:06 graham Status confirmed => resolved
2010-06-15 16:06 graham Resolution open => fixed
2010-06-15 16:06 graham Assigned To => graham
2010-06-30 18:08 jmcgrew Fixed in Version => 6E72
2010-07-01 23:07 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker