bugs.runtime.js
来自「javascript扩展库」· JavaScript 代码 · 共 54 行
JS
54 行
// test fix for bug where// if (true)// a = test2->()// was compiling out the assignmentfunction test() { var a; if (true) a = test2->(); trace(a);}function test2(coro) { if (coro.isResuming()) return coro.commence(); coro.suspend(); coro.resume(5); return NjsRuntime.SUSPEND;}test();assertTrail(5);// fix infinite loop bug caused by failure to// rethrow uncaught exceptionsfunction testInfiniteLoop() { nonexistent(); try { any->(); } catch(e) { }}try { testInfiniteLoop(); assert(false, "no exception");} catch(e) { assert(true, "got exception");}// make sure you can call a non-transformed// routine with the -> operatorfunction foo(i) { trace(i);}function testRegularMethod() { trace(1); foo->(2); trace(3);}testRegularMethod();
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?