From 28b4db447041207bcc4333c1d6bfa8031e79ebf3 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 10 Apr 2019 11:04:38 +0200 Subject: [PATCH] be consistent, strings have destructors for --gc:destructors --- compiler/semtypes.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 6e1a666c1bbc..e24597956734 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -1811,9 +1811,8 @@ proc processMagicType(c: PContext, m: PSym) = of mString: setMagicType(c.config, m, tyString, szUncomputedSize) rawAddSon(m.typ, getSysType(c.graph, m.info, tyChar)) - when false: - if c.config.selectedGc == gcDestructors: - incl m.typ.flags, tfHasAsgn + if c.config.selectedGc == gcDestructors: + incl m.typ.flags, tfHasAsgn of mCstring: setMagicIntegral(c.config, m, tyCString, c.config.target.ptrSize) rawAddSon(m.typ, getSysType(c.graph, m.info, tyChar))