This reverts commit 5f0c520489.
This commit is contained in:
parent
5f0c520489
commit
97f51ed7c2
3 changed files with 1 additions and 27 deletions
|
|
@ -573,7 +573,6 @@ template processScopeExpr(c: var Con; s: var Scope; ret: PNode, processCall: unt
|
||||||
let tmp = c.getTemp(s.parent[], ret.typ, ret.info)
|
let tmp = c.getTemp(s.parent[], ret.typ, ret.info)
|
||||||
tmp.sym.flags.incl sfSingleUsedTemp
|
tmp.sym.flags.incl sfSingleUsedTemp
|
||||||
let cpy = if hasDestructor(c, ret.typ):
|
let cpy = if hasDestructor(c, ret.typ):
|
||||||
s.parent[].final.add c.genDestroy(tmp)
|
|
||||||
moveOrCopy(tmp, ret, c, s, isDecl = true)
|
moveOrCopy(tmp, ret, c, s, isDecl = true)
|
||||||
else:
|
else:
|
||||||
newTree(nkFastAsgn, tmp, p(ret, c, s, normal))
|
newTree(nkFastAsgn, tmp, p(ret, c, s, normal))
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,6 @@ sink
|
||||||
destroy
|
destroy
|
||||||
copy
|
copy
|
||||||
destroy
|
destroy
|
||||||
(f: 1)
|
|
||||||
destroy
|
|
||||||
'''
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -772,15 +770,3 @@ proc pair(): tuple[a: C, b: C] =
|
||||||
|
|
||||||
discard pair()
|
discard pair()
|
||||||
|
|
||||||
|
|
||||||
# bug #17450
|
|
||||||
proc noConsume(x: OO) {.nosinks.} = echo x
|
|
||||||
|
|
||||||
proc main3 =
|
|
||||||
var i = 1
|
|
||||||
noConsume:
|
|
||||||
block:
|
|
||||||
OO(f: i)
|
|
||||||
|
|
||||||
main3()
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@ discard """
|
||||||
@[(input: @["KXSC", "BGMC"]), (input: @["PXFX"]), (input: @["WXRQ", "ZSCZD"])]
|
@[(input: @["KXSC", "BGMC"]), (input: @["PXFX"]), (input: @["WXRQ", "ZSCZD"])]
|
||||||
14
|
14
|
||||||
First tasks completed.
|
First tasks completed.
|
||||||
Second tasks completed.
|
Second tasks completed.'''
|
||||||
test1'''
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import strutils, os, std / wordwrap
|
import strutils, os, std / wordwrap
|
||||||
|
|
@ -242,13 +241,3 @@ when true:
|
||||||
test_string_b.setLen new_len_b
|
test_string_b.setLen new_len_b
|
||||||
|
|
||||||
echo "Second tasks completed."
|
echo "Second tasks completed."
|
||||||
|
|
||||||
# bug #17450
|
|
||||||
proc main =
|
|
||||||
var i = 1
|
|
||||||
echo:
|
|
||||||
block:
|
|
||||||
"test" & $i
|
|
||||||
|
|
||||||
main()
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue