MantisBT - Core Inform
View Issue Details
0001192Core InformKinds and type checkingpublic2014-02-07 10:002014-05-07 07:33
EmacsUser 
graham 
normalcriticalalways
closedfixed 
x86LinuxAny
6G60 
6L02 
(critical) Inform 6 compiler reports errors for valid code
0001192: Definition applying to kind of value references nonexistent local
The attached source fails with the I6 error

- - - -
File "auto.inf"; Line 10318 # Error: No such constant as "t_0"
- - - -

The relevant code:

- - - -
! When play begins:
[ R_741 ;
      ! phrase 1
      ! [1: showme whether or not bar is bazzed]
       #IFDEF DEBUG;print "~whether or not bar is bazzed~ = truth state: ", (DA_TruthState) ((((t_0.p13_baz == 1)))) , "^";#ENDIF;
 
   rfalse;
];
- - - -
There is a room.
A foo is a kind of value. The foo is bar.
A foo has a truth state called baz.
Definition: a foo is bazzed if its baz is true.
When play begins:
showme whether or not bar is bazzed.
36
Issue History
2014-02-07 10:00EmacsUserNew Issue
2014-02-07 19:10zarfNote Added: 0002451
2014-02-07 19:10zarfStatusnew => confirmed
2014-02-08 10:19mattweinerTag Attached: 36
2014-02-08 12:57grahamNote Added: 0002452
2014-02-08 12:57grahamStatusconfirmed => resolved
2014-02-08 12:57grahamResolutionopen => fixed
2014-02-08 12:57grahamAssigned To => graham
2014-05-07 07:32jmcgrewFixed in Version => 6L02
2014-05-07 07:33jmcgrewStatusresolved => closed

Notes
(0002451)
zarf   
2014-02-07 19:10   
Confirmed.

If there is a local variable t_0, the code compiles but blindly reads from t_0, regardless of its type or value. This generally causes a runtime error (or crash).
(0002452)
graham   
2014-02-08 12:57   
Fixed; a typo in the code which was supposed to substitute for the free variable in "X is bazzed".