diff options
author | Araq <rumpf_a@web.de> | 2013-12-13 01:21:23 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-12-13 01:21:23 +0100 |
commit | 328f1932925889d5bb7f91c68fb1504b9b26ba8c (patch) | |
tree | f26fa7993b085104fef4d54701d27eae5f40cc18 /compiler/semmagic.nim | |
parent | 6db20a4be8556621b3a33f87854b4b857c4dcf9e (diff) | |
download | Nim-328f1932925889d5bb7f91c68fb1504b9b26ba8c.tar.gz |
new VM: globals kinda work
Diffstat (limited to 'compiler/semmagic.nim')
-rw-r--r-- | compiler/semmagic.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim index a5f763519..aab4c82f5 100644 --- a/compiler/semmagic.nim +++ b/compiler/semmagic.nim @@ -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 |