fixes ttypeselectors

This commit is contained in:
Zahary Karadjov 2012-09-28 14:30:19 +03:00
commit 2aabae702d
3 changed files with 14 additions and 8 deletions

View file

@ -1573,11 +1573,7 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
result = semExpr(c, n.sons[0], flags)
of nkTypeOfExpr:
var typ = semTypeNode(c, n, nil).skipTypes({tyTypeDesc})
typ = makeTypedesc(c, typ)
var sym = newSym(skType, getIdent"TypeOfExpr",
typ.owner, n.info).linkTo(typ)
sym.flags.incl(sfAnon)
result = newSymNode(sym, n.info)
result = symNodeFromType(c, typ, n.info)
of nkCall, nkInfix, nkPrefix, nkPostfix, nkCommand, nkCallStrLit:
# check if it is an expression macro:
checkMinSonsLen(n, 1)