Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000848Core InformPhrases and functional programmingpublic2012-01-25 15:132014-05-07 07:34
ReporterEmacsUser 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSMac OS XOS Version10.6
Product Version6F95 
Target VersionFixed in Version6L02 
Summary0000848: Compiler reports spurious kind error on intended dynamic dispatch
DescriptionInform, on the attached source:

- - - -
Problem. You wrote 'bar V' , but 'V' has the wrong kind of value to go there: a temporary named value instead of a thing.
I was trying to match this phrase:

bar (v - thing that is the player)
This was what I found out:

V = a temporary named value, holding a thing
- - - -
Minimal Source Text To Reproduce
There is a room.

To bar (V - a thing that is the player):
	do nothing.

To baz (V - a thing):
	bar V.

To quux (V - a thing):
	bar V.
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships

-  Notes
(0001688)
curiousdannii (developer)
2012-06-20 08:17
edited on: 2012-06-20 08:17

That error makes sense doesn't it? Without the following phrase there is no dynamic dispatch, so there should be an error as there may be no valid bar phrase:

- - - -
To bar (V - a thing):
    do nothing.
- - - -

This however also has the error message:

- - - -
There is a room.
To bar (V - a thing that is the player):
    do nothing.
To baz (V - a thing that is the player):
    bar V.
To quux (V - a thing that is the player):
    bar V.
- - - -

What is most curious is if you comment out either baz or quux it will compile.

(0001693)
EmacsUser (manager)
2012-06-20 19:54

> as there may be no valid bar phrase

Normally Inform allows such situations; see 0000822 for an example. But if I'm missing something, and the source text is invalid, there should probably be a badly-worded-error-message bug instead, since the complaint seems to be about kinds. Adding ``Foo is a thing'' and replacing ``bar V'' with ``bar foo'' makes this point a little better.
(0002325)
graham (administrator)
2014-01-19 06:58

Fixed.

- Issue History
Date Modified Username Field Change
2012-01-25 15:13 EmacsUser New Issue
2012-06-20 08:17 curiousdannii Note Added: 0001688
2012-06-20 08:17 curiousdannii Status new => feedback
2012-06-20 08:17 curiousdannii Note Edited: 0001688 View Revisions
2012-06-20 19:54 EmacsUser Note Added: 0001693
2012-06-20 19:54 EmacsUser Status feedback => new
2013-03-30 02:17 jmcgrew Status new => confirmed
2014-01-19 06:58 graham Note Added: 0002325
2014-01-19 06:58 graham Status confirmed => resolved
2014-01-19 06:58 graham Resolution open => fixed
2014-01-19 06:58 graham Assigned To => graham
2014-05-07 07:34 jmcgrew Fixed in Version => 6L02
2014-05-07 07:34 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker