Hi Atte, The example you provided reveals a bug in chuck: order of declaration mattering when it should not. It's now noted to be fixed. Sorry for the confusion. Thanks! Best, Ge! On Jul 8, 2006, at 6:24 PM, Atte André Jensen wrote:
Hi
Attached is a piece of useless code that confuses me. Should it matter where class kidA is defined? Is this a bug?
-- peace, love & harmony Atte
http://www.atte.dk | quartet: http://www.anagrammer.dk http://www.atte.dk/gps | compositions: http://www.atte.dk/compositions class A{ fun void greet(){ <<<"hello">>>; } }
// works when defined here //class kidA extends A {}
class B{ fun void greet(){ } }
class kidB extends B{ 3 => int nb_kids; kidA kids[nb_kids];
fun void greet(){ for(0 => int i; i
// doesn't work when defined here class kidA extends A {}
/* A a; a.greet();
kidA kid_a; kid_a.greet(); */
kidB kid_b; kid_b.greet();_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users