bugfix: typo in actors.nim
This commit is contained in:
parent
51de278bd4
commit
1215193010
5 changed files with 18 additions and 2 deletions
|
|
@ -166,6 +166,7 @@ proc myOpen(module: PSym, filename: string): PPassContext =
|
||||||
c.semConstExpr = semConstExpr
|
c.semConstExpr = semConstExpr
|
||||||
c.semExpr = semExprNoFlags
|
c.semExpr = semExprNoFlags
|
||||||
c.semConstBoolExpr = semConstBoolExpr
|
c.semConstBoolExpr = semConstBoolExpr
|
||||||
|
c.semOverloadedCall = semOverloadedCall
|
||||||
pushProcCon(c, module)
|
pushProcCon(c, module)
|
||||||
pushOwner(c.module)
|
pushOwner(c.module)
|
||||||
openScope(c.tab) # scope for imported symbols
|
openScope(c.tab) # scope for imported symbols
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,8 @@ type
|
||||||
semConstExpr*: proc (c: PContext, n: PNode): PNode {.nimcall.} # for the pragmas
|
semConstExpr*: proc (c: PContext, n: PNode): PNode {.nimcall.} # for the pragmas
|
||||||
semExpr*: proc (c: PContext, n: PNode): PNode {.nimcall.} # for the pragmas
|
semExpr*: proc (c: PContext, n: PNode): PNode {.nimcall.} # for the pragmas
|
||||||
semConstBoolExpr*: proc (c: PContext, n: PNode): PNode {.nimcall.} # XXX bite the bullet
|
semConstBoolExpr*: proc (c: PContext, n: PNode): PNode {.nimcall.} # XXX bite the bullet
|
||||||
|
semOverloadedCall*: proc (c: PContext, n, nOrig: PNode,
|
||||||
|
filter: TSymKinds): PNode {.nimcall.}
|
||||||
includedFiles*: TIntSet # used to detect recursive include files
|
includedFiles*: TIntSet # used to detect recursive include files
|
||||||
filename*: string # the module's filename
|
filename*: string # the module's filename
|
||||||
userPragmas*: TStrTable
|
userPragmas*: TStrTable
|
||||||
|
|
|
||||||
|
|
@ -603,6 +603,18 @@ proc userConvMatch(c: PContext, m: var TCandidate, f, a: PType,
|
||||||
inc(m.convMatches)
|
inc(m.convMatches)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
proc localConvMatch(c: PContext, m: var TCandidate, f, a: PType,
|
||||||
|
arg: PNode): PNode =
|
||||||
|
var call = newNodeI(nkCall, arg.info)
|
||||||
|
call.add(f.n.copyTree)
|
||||||
|
call.add(arg.copyTree)
|
||||||
|
result = c.semOverloadedCall(c, call, call, RoutineKinds)
|
||||||
|
if result != nil:
|
||||||
|
# resulting type must be consistent with the other arguments:
|
||||||
|
var r = typeRel(m, f, result.typ)
|
||||||
|
if r < isGeneric: return nil
|
||||||
|
if result.kind == nkCall: result.kind = nkHiddenCallConv
|
||||||
|
inc(m.convMatches)
|
||||||
|
|
||||||
proc ParamTypesMatchAux(c: PContext, m: var TCandidate, f, a: PType,
|
proc ParamTypesMatchAux(c: PContext, m: var TCandidate, f, a: PType,
|
||||||
arg, argOrig: PNode): PNode =
|
arg, argOrig: PNode): PNode =
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,8 @@ proc poolWorker[TIn, TOut](self: PActor[TIn, TOut]) {.thread.} =
|
||||||
when TOut is void:
|
when TOut is void:
|
||||||
m.action(m.data)
|
m.action(m.data)
|
||||||
else:
|
else:
|
||||||
self.repy(m.action(m.data))
|
send(m.receiver[], m.action(m.data))
|
||||||
|
#self.reply()
|
||||||
|
|
||||||
proc createActorPool*[TIn, TOut](a: var TActorPool[TIn, TOut], poolSize = 4) =
|
proc createActorPool*[TIn, TOut](a: var TActorPool[TIn, TOut], poolSize = 4) =
|
||||||
## creates an actor pool.
|
## creates an actor pool.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
line: 10
|
line: 10
|
||||||
errormsg: "invalid capture: 'A'"
|
errormsg: "illegal capture: 'A'"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
proc outer() =
|
proc outer() =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue