View Issue Details

IDProjectCategoryView StatusLast Update
0009705New issuesScriptingpublic2017-08-14 11:19
ReportercsiguuszAssigned ToTalidan 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0009705: coroutine.resume returns only the first value returned by the coroutine
Description

Title says it all. It works with coroutine.wrap though.

Steps To Reproduce

iprint = iprint or print

function f1 ( )
coroutine.yield(10, 20)
return 1, 2
end

local cr = coroutine.create(f1)

iprint(coroutine.resume(cr))
-- outputs "true, 10" in MTA, but "true, 10, 20" with lua standalone

iprint(coroutine.resume(cr))
-- same error as above

-- all values returned correctly
local cr2 = coroutine.wrap(f1)
iprint(cr2())
iprint(cr2())

TagsNo tags attached.

Activities

Issue History

Date Modified Username Field Change