[chuck-users] forward reference oddity

Hans Aberg haberg at math.su.se
Fri Oct 2 19:48:43 EDT 2009


On 3 Oct 2009, at 00:39, Robert Poor wrote:

> This is odd, since (AFAIK) toString() is defined on the Object  
> class, and all classes inherit from Object.  If I remove the  
> toString() call on boros as below, it compiles without error.

It seem to be a bug. On the one hand the program can be simplified to:
   class A {
     B @ b;
     <<< "B:", b.toString() >>>;
   }

   class B {}
with the error still there. But the following compiles:
   class A {
     B @ b;
     <<< "B:", b.k >>>;
   }

   class B {
     int k;
   }

So chuck seems supposed to be able to handle forward references, but  
not working for toString().

   Hans




More information about the chuck-users mailing list