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 ;)

/Stefan

On Tue, Nov 24, 2009 at 7:51 PM, Hans Aberg <haberg@math.su.se> wrote:
For some reason, 'chuck' does not instantiate class static constants until there has been an instantiation of the class itself.

 Hans

---- static.ck ----
class Test {
 3 => static int d;

 fun static void print() {
   if (d == 0)  chout <= "Nope!\n";
   else  chout <= "Yep.\n";
 }
}

Test.print();
Test test_;
Test.print();

---- run ----
$ chuck static.ck
Nope!
Yep.
----

_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users



--
Release me, insect, or I will destroy the Cosmos!