made tests green again

This commit is contained in:
Araq 2012-07-09 00:54:46 +02:00
commit 795afb0021
15 changed files with 38 additions and 30 deletions

View file

@ -898,7 +898,7 @@ proc evalTemplate*(n: PNode, sym: PSym): PNode =
proc evalTypeTrait*(n: PNode, context: PSym): PNode =
## XXX: This should be pretty much guaranteed to be true
# by the type traits procs' signitures, but until the
# by the type traits procs' signatures, but until the
# code is more mature it doesn't hurt to be extra safe
internalAssert n.sons.len >= 2 and
n.sons[1].sym.typ.kind == tyTypeDesc
@ -906,7 +906,7 @@ proc evalTypeTrait*(n: PNode, context: PSym): PNode =
let typ = n.sons[1].sym.typ.skipTypes({tyTypeDesc})
case n.sons[0].sym.name.s
of "name":
result = newStrNode(nkStrLit, typ.typeToString)
result = newStrNode(nkStrLit, typ.typeToString(preferExported))
result.typ = newType(tyString, context)
result.info = n.info