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