make more tests green

This commit is contained in:
Zahary Karadjov 2013-12-29 00:00:37 +02:00
commit 66a2556525
15 changed files with 176 additions and 162 deletions

View file

@ -34,10 +34,9 @@ proc semInstantiationInfo(c: PContext, n: PNode): PNode =
proc semTypeTraits(c: PContext, n: PNode): PNode =
checkMinSonsLen(n, 2)
internalAssert n.sons[1].kind == nkSym
let typArg = n.sons[1].sym
if typArg.kind == skType or
(typArg.kind == skParam and typArg.typ.sonsLen > 0):
internalAssert n.sons[1].typ.kind == tyTypeDesc
let typArg = n.sons[1].typ
if typArg.sonsLen > 0:
# This is either a type known to sem or a typedesc
# param to a regular proc (again, known at instantiation)
result = evalTypeTrait(n[0], n[1], GetCurrOwner())