From d22fa090000689c550a644c37aefc21ba4f0dba1 Mon Sep 17 00:00:00 2001 From: Andrii Riabushenko Date: Mon, 10 Dec 2018 09:20:43 +0000 Subject: [PATCH] minor correction --- compiler/destroyer.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/destroyer.nim b/compiler/destroyer.nim index 7d2bb7221..407204e51 100644 --- a/compiler/destroyer.nim +++ b/compiler/destroyer.nim @@ -367,8 +367,7 @@ proc destructiveMoveVar(n: PNode; c: var Con): PNode = proc sinkParamIsLastReadCheck(c: var Con, s: PNode) = assert s.kind == nkSym and s.sym.kind == skParam - discard isLastRead(s, c) - if c.otherRead != nil: + if not isLastRead(s, c): localError(c.graph.config, c.otherRead.info, "sink parameter `" & $s.sym.name.s & "` is already consumed at " & toFileLineCol(c. graph.config, s.info))