We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isAUnit
nnkPostfix
1 parent 0ba909a commit dfb9562Copy full SHA for dfb9562
src/unchained/define_units.nim
@@ -720,9 +720,11 @@ macro isAUnit*(x: typed): untyped =
720
## `getUnitTypeImpl` & making use of CT tables (possibly of objects?)
721
let x = x.resolveAlias()
722
case x.kind
723
- of nnkSym, nnkDistinctTy:
+ of nnkSym, nnkDistinctTy, nnkPostfix:
724
let typ = x
725
- var xT = if typ.kind == nnkDistinctTy: typ[0] else: typ
+ var xT = if typ.kind == nnkDistinctTy: typ[0]
726
+ elif typ.kind == nnkPostfix: typ[1]
727
+ else: typ
728
while xT.strVal notin quantityList():
729
xT = xT.getTypeImpl
730
case xT.kind
0 commit comments