MantisBT - Core Inform
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000080||Core Inform||Relations||public||2010-06-21 00:32||2010-10-28 00:30|
|Target Version||Fixed in Version||6F95|
|Effect||(mild) Compiler accepts invalid code|
|Summary||0000080: Untyped relations are allowed but can't be used safely|
|Description||Inform accepts "relation" or "relation of values to values" as the type of a global variable or property, but such a generic type breaks type safety (and is forbidden as the type of a local variable). The code below stores indexed text and numbers in the same domain, but the indexed text is treated as a number when printed.|
|Minimal Source Text To Reproduce||Home is a room.|
Foo is a relation that varies.
A thing has a relation of values to values called bar.
When play begins:
let X be indexed text;
let X be "grunk";
now foo relates 4 to X;
show relation foo.
|Additional Information||The indexed text can still be pulled out with "the indexed text to which 4 relates by foo", but since the relation code doesn't know which values are block type, its lifetime won't be managed reliably when the relation is modified.|
"list of values" is already forbidden as the type of a variable or property.
|Tags||No tags attached.|
|2010-06-21 00:32||jmcgrew||New Issue|
|2010-06-21 00:32||jmcgrew||Status||new => acknowledged|
|2010-06-21 10:25||jmcgrew||Additional Information Updated||bug_revision_view_page.php?rev_id=57#r57|
|2010-06-21 12:27||EmacsUser||Status||acknowledged => confirmed|
|2010-09-29 01:52||graham||Note Added: 0000611|
|2010-09-29 01:52||graham||Status||confirmed => resolved|
|2010-09-29 01:52||graham||Resolution||open => fixed|
|2010-09-29 01:52||graham||Assigned To||=> graham|
|2010-10-25 21:14||jmcgrew||Fixed in Version||=> 6F95|
|2010-10-28 00:30||jmcgrew||Status||resolved => closed|