Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000107Core InformPhrases and functional programmingpublic2010-06-23 14:142010-07-01 23:07
Reporterfundin 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSWindowsOS VersionVista
Product Version6E59 
Target VersionFixed in Version6E72 
Summary0000107: Phrase references used as cases in switch blocks lose their types
DescriptionThe example source results in the following problem report:

Problem. The case '-- squaring' has the wrong kind of value for the possibilities being chosen from: a phrase nothing -> nothing instead of a phrase number -> number.
Minimal Source Text To Reproduce
Home is a room.

To decide which number is (N - a number) squared (this is squaring):
	decide on N * N.

To consider (P - a phrase number -> number):
	if P is:
		-- squaring:
			say "Considering squaring."
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships

-  Notes
(0000141)
EmacsUser (manager)
2010-06-23 17:52

There's something more going on, because this code:

There is a room.
To waste time (this is wasting time):
stop.
To consider (P - a phrase nothing -> nothing):
if P is:
-- wasting time:
stop.

results in this error:

Problem. The case '-- wasting time' has the wrong kind of value for the possibilities being chosen from: a phrase nothing -> nothing instead of a phrase nothing -> nothing.
 See the manual: 11.8 > Otherwise
(0000196)
graham (administrator)
2010-06-30 14:04

Fixed (both reported symptoms).

- Issue History
Date Modified Username Field Change
2010-06-23 14:14 fundin New Issue
2010-06-23 14:37 jmcgrew Severity mild => serious
2010-06-23 14:37 jmcgrew Status new => acknowledged
2010-06-23 14:39 jmcgrew Category Kinds and type checking => Phrases and functional programming
2010-06-23 17:52 EmacsUser Note Added: 0000141
2010-06-23 17:52 EmacsUser Status acknowledged => confirmed
2010-06-30 14:04 graham Note Added: 0000196
2010-06-30 14:04 graham Status confirmed => resolved
2010-06-30 14:04 graham Resolution open => fixed
2010-06-30 14:04 graham Assigned To => graham
2010-06-30 18:07 jmcgrew Fixed in Version => 6E72
2010-07-01 23:07 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker