discard""" matrix: "--mm:arc; --mm:refc" disabled: "freebsd" output: "42""""importstd/assertionsfromstd/threadpoolimportspawn,`^`,syncblock:# bug #12005procdoworkok(i:int){.thread.}=echoispawn(doworkok(42))sync()# this works when returning void!procdoworkbad(i:int):int{.thread.}=idoAssert^spawn(doworkbad(42))==42# bug was here