MantisBT - Core Inform
View Issue Details
0000105Core InformPhrases and functional programmingpublic2010-06-23 13:542010-10-28 00:32
(serious) Compiler rejects valid code
0000105: Phrases applying only to specific values don't work for some KOVs
Of the two phrases in the example source, the generic one is invoked rather than the one applying to the specific value.
Home is a room.

To consider (L - a list of numbers): say "Just some list."

To consider (L - {3}): say "A specific list."

When play begins: consider {3}.
This also affects other kinds of values, or at any rate references to phrases, which is what I was originally working with.
No tags attached.
related to 0000368closed graham No dynamic dispatch for phrases applying to specific phrases 
Issue History
2010-06-23 13:54fundinNew Issue
2010-06-23 14:36jmcgrewStatusnew => acknowledged
2010-06-23 17:25EmacsUserNote Added: 0000139
2010-06-23 17:25EmacsUserStatusacknowledged => confirmed
2010-06-23 17:26EmacsUserEffect(serious/mild) Game compiles but misbehaves => (serious) Compiler rejects valid code
2010-06-23 17:26EmacsUserSeveritymild => serious
2010-06-30 13:59grahamNote Added: 0000195
2010-06-30 13:59grahamStatusconfirmed => resolved
2010-06-30 13:59grahamResolutionopen => fixed
2010-06-30 13:59grahamAssigned To => graham
2010-06-30 18:07jmcgrewFixed in Version => 6E72
2010-07-01 23:07jmcgrewStatusresolved => closed
2010-07-05 06:40fundinNote Added: 0000237
2010-07-05 06:40fundinStatusclosed => feedback
2010-07-05 06:40fundinResolutionfixed => reopened
2010-07-06 13:18jmcgrewStatusfeedback => acknowledged
2010-07-07 12:18EmacsUserStatusacknowledged => confirmed
2010-09-21 16:52grahamNote Added: 0000574
2010-09-21 16:52grahamStatusconfirmed => resolved
2010-09-21 16:52grahamResolutionreopened => fixed
2010-10-28 00:32jmcgrewStatusresolved => closed
2010-10-29 09:04jmcgrewRelationship addedrelated to 0000368

2010-06-23 17:25   
The issue is that the latter phrase is not matched at all. A reduced test case:

There is a room.
To check (L - {3}): stop.
When play begins: check {3}.

This code yields the error:

Problem. In the sentence 'check {3}' , I was expecting that '{3}' would be the specific value '{ 3 }'.
I was trying to match this phrase:

check ({ 3 } - { 3 })
This was what I found out:

{3} = a list of numbers
2010-06-30 13:59   
2010-07-05 06:40   
Okay. Lists now work, but phrase references still have the same problem. Test case:

Home is a room.

To waste time (this is wasting time): do nothing.
To disregard (P - wasting time): do nothing.

When play begins: disregard wasting time.
2010-09-21 16:52   
It would be helpful not to reopen these things with fresh test cases down in the notes - I spent a short while investigating the original test case and found, of course, that it was working fine... However, the second test case (an unrelated bug) is also now fixed, so this issue is well and truly resolved.