fixed #597
This commit is contained in:
parent
8e0941576f
commit
02533c260b
5 changed files with 126 additions and 37 deletions
|
|
@ -86,7 +86,7 @@ include semdestruct
|
|||
|
||||
proc semDestructorCheck(c: PContext, n: PNode, flags: TExprFlags) {.inline.} =
|
||||
if efAllowDestructor notin flags and n.kind in nkCallKinds+{nkObjConstr}:
|
||||
if instantiateDestructor(c, n.typ):
|
||||
if instantiateDestructor(c, n.typ) != nil:
|
||||
localError(n.info, errGenerated,
|
||||
"usage of a type with a destructor in a non destructible context")
|
||||
# This still breaks too many things:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue