diff options
author | Araq <rumpf_a@web.de> | 2019-08-12 13:58:35 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-08-12 13:58:35 +0200 |
commit | 289b5e9ef93cd350e75f4d90d264e56df64c5a8d (patch) | |
tree | 21f47f7c927cb3e9cde69cdd4e52c39c81cc99a5 /compiler/injectdestructors.nim | |
parent | c9c28bf85ee428e710a510a9825e514d30b0e298 (diff) | |
download | Nim-289b5e9ef93cd350e75f4d90d264e56df64c5a8d.tar.gz |
fixes #11254
Diffstat (limited to 'compiler/injectdestructors.nim')
-rw-r--r-- | compiler/injectdestructors.nim | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/compiler/injectdestructors.nim b/compiler/injectdestructors.nim index 6f1da37fb..4f96d236f 100644 --- a/compiler/injectdestructors.nim +++ b/compiler/injectdestructors.nim @@ -437,17 +437,6 @@ proc sinkParamIsLastReadCheck(c: var Con, s: PNode) = localError(c.graph.config, c.otherRead.info, "sink parameter `" & $s.sym.name.s & "` is already consumed at " & toFileLineCol(c. graph.config, s.info)) -proc isSinkTypeForParam(t: PType): bool = - # a parameter like 'seq[owned T]' must not be used only once, but its - # elements must, so we detect this case here: - result = t.skipTypes({tyGenericInst, tyAlias}).kind in {tySink, tyOwned} - when false: - if isSinkType(t): - if t.skipTypes({tyGenericInst, tyAlias}).kind in {tyArray, tyVarargs, tyOpenArray, tySequence}: - result = false - else: - result = true - proc passCopyToSink(n: PNode; c: var Con): PNode = result = newNodeIT(nkStmtListExpr, n.info, n.typ) let tmp = getTemp(c, n.typ, n.info) |