mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 13:33:22 +00:00
Fixed NimTypeKind enum, added missing values. (#6157)
This commit is contained in:
committed by
Andreas Rumpf
parent
670d63a331
commit
8481e9ff14
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user