summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-12-29 16:09:47 -0800
committerAndreas Rumpf <rumpf_a@web.de>2018-12-30 01:09:47 +0100
commit083129286349ba440018cff1ed20172b675b84fe (patch)
tree812b2c252fd8947f6e5546991e5c6220703bfc9d /compiler
parenteba8ffcf70cca5dd802c5d33f6ecea814829f9fc (diff)
downloadNim-083129286349ba440018cff1ed20172b675b84fe.tar.gz
revives: Move typetraits.`$` to system. Fixes #5827 (#10071)
* Move typetraits.`$` to system. Fixes #5827.
* revive PR; adjust code to make sure everything works and add tests
* fix tests/concepts/tstackconcept.nim
* address comments
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semmagic.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim
index 7e61854b8..568b418e9 100644
--- a/compiler/semmagic.nim
+++ b/compiler/semmagic.nim
@@ -136,7 +136,7 @@ proc evalTypeTrait(c: PContext; traitCall: PNode, operand: PType, context: PSym)
     return typeWithSonsResult(tyAnd, @[operand, operand2])
   of "not":
     return typeWithSonsResult(tyNot, @[operand])
-  of "name":
+  of "name", "$":
     result = newStrNode(nkStrLit, operand.typeToString(preferTypeName))
     result.typ = newType(tyString, context)
     result.info = traitCall.info