revert discard in destroyer (#10840)
* revert discard in destroyer * disable test
This commit is contained in:
parent
e263702688
commit
5dea7c5ad7
3 changed files with 1 additions and 27 deletions
|
|
@ -697,10 +697,6 @@ proc p(n: PNode; c: var Con): PNode =
|
|||
of nkNone..nkNilLit, nkTypeSection, nkProcDef, nkConverterDef, nkMethodDef,
|
||||
nkIteratorDef, nkMacroDef, nkTemplateDef, nkLambda, nkDo, nkFuncDef:
|
||||
result = n
|
||||
of nkDiscardStmt:
|
||||
result = n
|
||||
if n[0].typ != nil and hasDestructor(n[0].typ):
|
||||
result = genDestroy(c, n[0].typ, n[0])
|
||||
of nkCast, nkHiddenStdConv, nkHiddenSubConv, nkConv:
|
||||
result = copyNode(n)
|
||||
# Destination type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue