diff options
author | Araq <rumpf_a@web.de> | 2012-08-15 08:13:31 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-08-15 08:13:31 +0200 |
commit | 12151930101f6eacb834c2102cfdaccc637ce72a (patch) | |
tree | 1b3b6975cb10388816f98b60f673327988012b5e | |
parent | 51de278bd4cf7a8819652176600329022e2353ff (diff) | |
download | Nim-12151930101f6eacb834c2102cfdaccc637ce72a.tar.gz |
bugfix: typo in actors.nim
-rwxr-xr-x | compiler/sem.nim | 1 | ||||
-rwxr-xr-x | compiler/semdata.nim | 2 | ||||
-rwxr-xr-x | compiler/sigmatch.nim | 12 | ||||
-rw-r--r-- | lib/pure/actors.nim | 3 | ||||
-rw-r--r-- | tests/reject/tinvalidclosure2.nim | 2 |
5 files changed, 18 insertions, 2 deletions
diff --git a/compiler/sem.nim b/compiler/sem.nim index 7f461a11c..391bf840c 100755 --- a/compiler/sem.nim +++ b/compiler/sem.nim @@ -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 diff --git a/compiler/semdata.nim b/compiler/semdata.nim index 202f752b5..0fc5399d2 100755 --- a/compiler/semdata.nim +++ b/compiler/semdata.nim @@ -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 diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 39a754a80..f55d90a57 100755 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -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 = diff --git a/lib/pure/actors.nim b/lib/pure/actors.nim index 121dabf82..c6f277745 100644 --- a/lib/pure/actors.nim +++ b/lib/pure/actors.nim @@ -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. diff --git a/tests/reject/tinvalidclosure2.nim b/tests/reject/tinvalidclosure2.nim index a84bdafa3..d06e5eccc 100644 --- a/tests/reject/tinvalidclosure2.nim +++ b/tests/reject/tinvalidclosure2.nim @@ -1,6 +1,6 @@ discard """ line: 10 - errormsg: "invalid capture: 'A'" + errormsg: "illegal capture: 'A'" """ proc outer() = |