MantisBT - Core Inform
View Issue Details
0000104Core InformRelationspublic2010-06-22 14:232010-07-01 23:07
(serious/mild) Game compiles but misbehaves
0000104: Can't test one-to-one relations of values directly
The test in the example source fails after triggering run-time problem P18.
Home is a room.

Partnership relates one number to one number. The verb to belong with (he belongs with, they belong with) implies the partnership relation.

3 belongs with 7.

When play begins:
if 3 belongs with 7, say "Test succeeded.";
otherwise say "Test failed.";
The relation is initialised correctly, but the test is compiled as if it involved values that can have properties. (Equivalence relations are not affected, by the way, but one-to-various and various-to-one are.)

This is tangential to a couple of previous reports, so it might have been fixed already.
No tags attached.
Issue History
2010-06-22 14:23fundinNew Issue
2010-06-22 15:10jmcgrewAssigned To => jmcgrew
2010-06-22 15:10jmcgrewStatusnew => acknowledged
2010-06-22 18:06jmcgrewNote Added: 0000132
2010-06-22 18:06jmcgrewAssigned Tojmcgrew =>
2010-06-22 18:06jmcgrewStatusacknowledged => confirmed
2010-06-30 13:13grahamNote Added: 0000194
2010-06-30 13:13grahamStatusconfirmed => resolved
2010-06-30 13:13grahamResolutionopen => fixed
2010-06-30 13:13grahamAssigned To => graham
2010-06-30 18:07jmcgrewFixed in Version => 6E72
2010-07-01 23:07jmcgrewStatusresolved => closed

2010-06-22 18:06   
The generated code checks the relation with "if (((3 == (GProperty(NUMBER_TY, 7, p56_partnership)))))" rather than calling the dynamic relation handler.
2010-06-30 13:13   
Fixed. It was setting up the relation correctly, then incorrectly optimising by using the 1-1 status of the relation to speed up access in a way which doesn't work for dynamic relations.