diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 4099486299..0dbd8234d1 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 8b787b0221..fa02bce572 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()