diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-04-15 17:33:26 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-04-15 17:33:26 +0200 |
commit | e14e5be9988214c9df9faffd15883d4a4dc30437 (patch) | |
tree | 332f9c2d14db95202589dfe890eab897706fb62a | |
parent | 97cb0eb694f1176ac7af50a447a47c60989a81a4 (diff) | |
parent | 9700298d07ff710bb69075094c921011bc749388 (diff) | |
download | Nim-e14e5be9988214c9df9faffd15883d4a4dc30437.tar.gz |
Merge pull request #2549 from fowlmouth/patch-2
fixes for macros.getType()
-rw-r--r-- | compiler/vmdeps.nim | 4 | ||||
-rw-r--r-- | lib/core/macros.nim | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/compiler/vmdeps.nim b/compiler/vmdeps.nim index 6148ed319..21ee4967b 100644 --- a/compiler/vmdeps.nim +++ b/compiler/vmdeps.nim @@ -144,7 +144,9 @@ proc mapTypeToAst(t: PType, info: TLineInfo; allowRecursion=false): PNode = of tyIter: result = mapTypeToBracket("iter", t, info) of tyProxy: result = atomicType"error" of tyBuiltInTypeClass: result = mapTypeToBracket("builtinTypeClass", t, info) - of tyUserTypeClass: result = mapTypeToBracket("userTypeClass", t, info) + of tyUserTypeClass: + result = mapTypeToBracket("concept", t, info) + result.add t.n.copyTree of tyCompositeTypeClass: result = mapTypeToBracket("compositeTypeClass", t, info) of tyAnd: result = mapTypeToBracket("and", t, info) of tyOr: result = mapTypeToBracket("or", t, info) diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 5583748e0..786b84171 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -88,7 +88,9 @@ type ntyBigNum, ntyConst, ntyMutable, ntyVarargs, ntyIter, - ntyError + ntyError, + ntyBuiltinTypeClass, ntyConcept, ntyConceptInst, ntyComposite, + ntyAnd, ntyOr, ntyNot TNimTypeKinds* {.deprecated.} = set[NimTypeKind] NimSymKind* = enum |