diff options
author | Yuriy Glukhov <yglukhov@users.noreply.github.com> | 2017-07-30 12:10:07 +0300 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-07-30 11:10:07 +0200 |
commit | 8481e9ff14f39dab98c65e4c618fb8a847444b7d (patch) | |
tree | d527634d0f73dc55e06edb04637c26437278cd34 | |
parent | 670d63a3318533f7d7e7d1cedc88cb7f8f6cb11a (diff) | |
download | Nim-8481e9ff14f39dab98c65e4c618fb8a847444b7d.tar.gz |
Fixed NimTypeKind enum, added missing values. (#6157)
-rw-r--r-- | lib/core/macros.nim | 5 | ||||
-rw-r--r-- | tests/macros/tgettype.nim | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 409948629..0dbd8234d 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -94,8 +94,9 @@ type ntyVarargs, ntyUnused, ntyError, - ntyBuiltinTypeClass, ntyConcept, ntyConceptInst, ntyComposite, - ntyAnd, ntyOr, ntyNot + ntyBuiltinTypeClass, ntyUserTypeClass, ntyUserTypeClassInst, + ntyCompositeTypeClass, ntyInferred, ntyAnd, ntyOr, ntyNot, + ntyAnything, ntyStatic, ntyFromExpr, ntyFieldAccessor, ntyVoid TNimTypeKinds* {.deprecated.} = set[NimTypeKind] NimSymKind* = enum diff --git a/tests/macros/tgettype.nim b/tests/macros/tgettype.nim index 8b787b022..fa02bce57 100644 --- a/tests/macros/tgettype.nim +++ b/tests/macros/tgettype.nim @@ -18,3 +18,10 @@ macro testGeneric(T: typedesc[Model]): string= echo testUser echo User.testGeneric + +macro assertVoid(e: typed): untyped = + assert(getTypeInst(e).typeKind == ntyVoid) + +proc voidProc() = discard + +assertVoid voidProc() |