fork download
  1. tostring=tostring or function(v)
  2. if type(v)=='boolean' then return v and'true'or'false'
  3. elseif type(v)=='string' then return v
  4. elseif type(v)=='number' then return ''..v
  5. else return type(v)
  6. end
  7. end
  8.  
  9. function dump(t, sep)
  10. local s=''
  11. for i=1,#t do
  12. s=s..tostring(t[i])..(i<#t and '\n' or '')
  13. end
  14. return s
  15. end
  16.  
  17. coresume=coresume or coroutine.resume
  18. cocreate=cocreate or coroutine.create
  19. print(dump{coresume(cocreate(function() local x = nil + 1 end))})
Success #stdin #stdout 0s 15000KB
stdin
Standard input is empty
stdout
false
prog.lua:19: attempt to perform arithmetic on a nil value