Not necessarily a bug. Again, consistent with how Java works with classes (I sometimes wonder if Ge got hold of the Java compiler source code cheap ;)<div><br></div><div>/Stefan<br><br><div class="gmail_quote">On Tue, Nov 24, 2009 at 7:51 PM, Hans Aberg <span dir="ltr">&lt;<a href="mailto:haberg@math.su.se">haberg@math.su.se</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">For some reason, &#39;chuck&#39; does not instantiate class static constants until there has been an instantiation of the class itself.<br>

<br>
  Hans<br>
<br>
---- <a href="http://static.ck" target="_blank">static.ck</a> ----<br>
class Test {<br>
  3 =&gt; static int d;<br>
<br>
  fun static void print() {<br>
    if (d == 0)  chout &lt;= &quot;Nope!\n&quot;;<br>
    else  chout &lt;= &quot;Yep.\n&quot;;<br>
  }<br>
}<br>
<br>
Test.print();<br>
Test test_;<br>
Test.print();<br>
<br>
---- run ----<br>
$ chuck <a href="http://static.ck" target="_blank">static.ck</a><br>
Nope!<br>
Yep.<br>
----<br>
<br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Release me, insect, or I will destroy the Cosmos!<br>
</div>