Fixed NimTypeKind enum, added missing values. (#6157)
This commit is contained in:
parent
670d63a331
commit
8481e9ff14
2 changed files with 10 additions and 2 deletions
|
|
@ -94,8 +94,9 @@ type
|
||||||
ntyVarargs,
|
ntyVarargs,
|
||||||
ntyUnused,
|
ntyUnused,
|
||||||
ntyError,
|
ntyError,
|
||||||
ntyBuiltinTypeClass, ntyConcept, ntyConceptInst, ntyComposite,
|
ntyBuiltinTypeClass, ntyUserTypeClass, ntyUserTypeClassInst,
|
||||||
ntyAnd, ntyOr, ntyNot
|
ntyCompositeTypeClass, ntyInferred, ntyAnd, ntyOr, ntyNot,
|
||||||
|
ntyAnything, ntyStatic, ntyFromExpr, ntyFieldAccessor, ntyVoid
|
||||||
|
|
||||||
TNimTypeKinds* {.deprecated.} = set[NimTypeKind]
|
TNimTypeKinds* {.deprecated.} = set[NimTypeKind]
|
||||||
NimSymKind* = enum
|
NimSymKind* = enum
|
||||||
|
|
|
||||||
|
|
@ -18,3 +18,10 @@ macro testGeneric(T: typedesc[Model]): string=
|
||||||
|
|
||||||
echo testUser
|
echo testUser
|
||||||
echo User.testGeneric
|
echo User.testGeneric
|
||||||
|
|
||||||
|
macro assertVoid(e: typed): untyped =
|
||||||
|
assert(getTypeInst(e).typeKind == ntyVoid)
|
||||||
|
|
||||||
|
proc voidProc() = discard
|
||||||
|
|
||||||
|
assertVoid voidProc()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue