Merge pull request #1124 from EXetoC/spawn-arg-check

Spawn argument checking.
This commit is contained in:
Andreas Rumpf 2014-04-20 23:34:21 +02:00
commit 38892bbf6a
2 changed files with 8 additions and 1 deletions

View file

@ -404,7 +404,7 @@ proc evalOp(m: TMagic, n, a, b, c: PNode): PNode =
mExit, mInc, ast.mDec, mEcho, mSwap, mAppendStrCh, mExit, mInc, ast.mDec, mEcho, mSwap, mAppendStrCh,
mAppendStrStr, mAppendSeqElem, mSetLengthStr, mSetLengthSeq, mAppendStrStr, mAppendSeqElem, mSetLengthStr, mSetLengthSeq,
mParseExprToAst, mParseStmtToAst, mExpandToAst, mTypeTrait, mParseExprToAst, mParseStmtToAst, mExpandToAst, mTypeTrait,
mNLen..mNError, mEqRef, mSlurp, mStaticExec, mNGenSym: mNLen..mNError, mEqRef, mSlurp, mStaticExec, mNGenSym, mSpawn:
discard discard
of mRand: of mRand:
result = newIntNodeT(math.random(a.getInt.int), n) result = newIntNodeT(math.random(a.getInt.int), n)

View file

@ -0,0 +1,7 @@
discard """
line: 7
errormsg: "'spawn' takes a call expression of type void"
cmd: "nimrod $target --threads:on $options $file"
"""
spawn(1)