!7 set flag _MethodCache_debug. sclass Bla { S ok() { ret 'jaOK; } int yo(int x) { ret x+5; } S yo(S x) { ret 'ja + x; } S testMe(int x) { ret 'int; } } sclass DaStatic { sS sOK() { ret 'sJaOK; } static int yo(int x) { ret x+5; } sS yo(S x) { ret 'ja + x; } } p-exp { twice { assertEqualsVerbose('jaOK, call_cached(new Bla, 'ok)); assertException(r { call_cached(new Bla, 'sOK) }); assertEqualsVerbose(15, call_cached(new Bla, 'yo, 10)); assertEqualsVerbose('jaX, call_cached(new Bla, 'yo, 'X)); assertException(r { call_cached(new Bla, 'yoyo) }); assertException(r { call_cached(new Bla, 'yo, 5.0) }); assertException(r { call_cached(Bla, 'ok) }); // non-static method assertException(r { call_cached(new Bla, 'testMe, 'test) }); assertException(r { call_cached(DaStatic, 'ok) }); assertEqualsVerbose('sJaOK, call_cached(DaStatic, 'sOK)); assertEqualsVerbose(15, call_cached(DaStatic, 'yo, 10)); assertEqualsVerbose('jaX, call_cached(DaStatic, 'yo, 'X)); assertException(r { call_cached(DaStatic, 'yoyo) }); assertException(r { call_cached(DaStatic, 'yo, 5.0) }); } }