gamesys / moonshine

A lightweight Lua VM for the browser
http://moonshinejs.org
MIT License
502 stars 35 forks source link

coroutine.wrap fails on resume #8

Open daurnimator opened 10 years ago

daurnimator commented 10 years ago
Uncaught TypeError: Cannot read property '_coroutineStack' of undefined moonshine.js:2428
shine.Coroutine._remove moonshine.js:2428
shine.Coroutine.resume moonshine.js:2508
shine.lib.coroutine.shine.Table.resume moonshine.js:3621
result

Minimal example:

local f = coroutine.wrap ( function(resume)
    window:setTimeout(resume,0)
    coroutine.yield()
    print("HERE")
end )
f ( f )