Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000739Core InformKinds and type checkingpublic2011-09-06 23:582014-05-07 07:34
ReporterEmacsUser 
Assigned Tograham 
PrioritynormalSeveritycosmeticReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSMac OS XOS Version10.6
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000739: Error message mentions wrong phrase for kind mismatch
DescriptionThe attached source provokes

- - - -
Problem. You wrote 'Definition' : but the ingredients in this phrase do not fit it, but I am confused enough by this that I can't give a very helpful problem message. Sorry about that.
I was trying to match this phrase:

bar (it - object)
This was what I found out:

it = a temporary named value, holding an object
- - - -

and

- - - -
Problem. You wrote 'Definition' : again, the ingredients in this phrase do not fit it.
I was trying to match this phrase:

bar (it - object)
- - - -

However, it is the foo phrase whose argument is mistyped.

The problem is possible without I6 macros, as in

- - - -
Definition: an object is odd if the square root of the holder of it is odd.
- - - -

but I originally saw the issue because a phrase had the wrong return kind, something that's only likely to happen when inlining I6.
Minimal Source Text To Reproduce
There is a room.
To decide what number is foo (X - a number): (- {X} -).
To decide what time is bar (X - an object): (- {X} -).
Definition: an object is odd if foo bar it is odd.
TagsNo tags attached.
Effect(cosmetic) Error message is badly worded
Attached Files

- Relationships

-  Notes
(0001283)
EmacsUser (manager)
2011-09-20 22:06

Another test case based on 0000753, where the error message differs:

- - - -
There is a room.
To decide what K is foo (X - a value of kind K) bar (Y - a K):
    decide on X.
When play begins:
    say "[foo yourself bar four]."
- - - -

This looks like the same bug, but I mention it here in case it's actually different.
(0001399)
graham (administrator)
2011-10-16 12:37

I simplified this slightly to:

There is a room.
To decide what number is foo (X - a number): (- {X} -).
To decide what time is bar (X - an object): (- {X} -).
Every turn: if foo bar yourself is odd, say "Yep".

And have improved the reporting so that Inform now says:

In 'if foo bar yourself is odd, say "Yep"' (source text, line 5), the phrase 'bar yourself' doesn't seem to fit: I was hoping it would be a number, but in fact it's a time.

- Issue History
Date Modified Username Field Change
2011-09-06 23:58 EmacsUser New Issue
2011-09-20 22:06 EmacsUser Note Added: 0001283
2011-10-15 03:50 jmcgrew Status new => acknowledged
2011-10-16 12:37 graham Note Added: 0001399
2011-10-16 12:37 graham Status acknowledged => resolved
2011-10-16 12:37 graham Resolution open => fixed
2011-10-16 12:37 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