new VM: globals kinda work
This commit is contained in:
parent
6db20a4be8
commit
328f193292
7 changed files with 45 additions and 12 deletions
|
|
@ -51,7 +51,9 @@ proc semTypeTraits(c: PContext, n: PNode): PNode =
|
|||
checkMinSonsLen(n, 2)
|
||||
let t = n.sons[1].typ
|
||||
internalAssert t != nil
|
||||
if not containsGenericType(t):
|
||||
if t.kind == tyTypeDesc and t.len == 0:
|
||||
result = n
|
||||
elif not containsGenericType(t):
|
||||
result = evalTypeTrait(n[0], t, GetCurrOwner())
|
||||
else:
|
||||
# a typedesc variable, pass unmodified to evals
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue