mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 03:14:08 +00:00
bugfix: typo in actors.nim
This commit is contained in:
@@ -166,6 +166,7 @@ proc myOpen(module: PSym, filename: string): PPassContext =
|
||||
c.semConstExpr = semConstExpr
|
||||
c.semExpr = semExprNoFlags
|
||||
c.semConstBoolExpr = semConstBoolExpr
|
||||
c.semOverloadedCall = semOverloadedCall
|
||||
pushProcCon(c, module)
|
||||
pushOwner(c.module)
|
||||
openScope(c.tab) # scope for imported symbols
|
||||
|
||||
@@ -72,6 +72,8 @@ type
|
||||
semConstExpr*: 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
|
||||
semOverloadedCall*: proc (c: PContext, n, nOrig: PNode,
|
||||
filter: TSymKinds): PNode {.nimcall.}
|
||||
includedFiles*: TIntSet # used to detect recursive include files
|
||||
filename*: string # the module's filename
|
||||
userPragmas*: TStrTable
|
||||
|
||||
@@ -603,6 +603,18 @@ proc userConvMatch(c: PContext, m: var TCandidate, f, a: PType,
|
||||
inc(m.convMatches)
|
||||
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,
|
||||
arg, argOrig: PNode): PNode =
|
||||
|
||||
@@ -118,7 +118,8 @@ proc poolWorker[TIn, TOut](self: PActor[TIn, TOut]) {.thread.} =
|
||||
when TOut is void:
|
||||
m.action(m.data)
|
||||
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) =
|
||||
## creates an actor pool.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
discard """
|
||||
line: 10
|
||||
errormsg: "invalid capture: 'A'"
|
||||
errormsg: "illegal capture: 'A'"
|
||||
"""
|
||||
|
||||
proc outer() =
|
||||
|
||||
Reference in New Issue
Block a user