Local-static bug
For some reason, 'chuck' does not admit different type argument overloading on local & static class functions. The example below works as long as one does not call the static function. So either it should complain that it is illegal when encountering it in the class or admit this kind of overloading. Originally, I used a function "add" on intervals - not as artificial as the example below. Hans ---- local-static.ck ---- class Test { fun void print(float x) { chout <= "Local fun: " <= x <= "\n"; } fun static void print(float x, float y) { chout <= "Static fun: (" <= x <= ", " <= y <= ")\n"; } } Test.print(1, 2); // This call causes the run error. //Test t; //t.print(2); ---- run ---- $ chuck local-static.ck [local-static.ck]:line(11): cannot access member 'Test.print' without object instance... ----
participants (1)
-
Hans Aberg