[Nickle] Is this a bug?

James LaMar giantrobot at f-m.fm
Thu Nov 18 17:11:59 PST 2004


Structs with uninitialized values can't be used as keys... is this a
bug?

> typedef struct { int k, s; } m;
> m k;
> k
{k = <uninit>, s = <uninit>}
> int[m] hsh = {} 
(int [m]) {}
> hsh[k]
Unhandled exception uninitialized_value ("uninitialized hash element")
<stdin>:5:     hsh[k];
-- 
  James
  giantrobot at f-m.fm




More information about the Nickle mailing list