introduce tyFromExpr; fixes #618
This commit is contained in:
parent
02533c260b
commit
789ba107cf
13 changed files with 109 additions and 28 deletions
|
|
@ -287,6 +287,10 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType =
|
|||
of tyGenericBody:
|
||||
internalError(cl.info, "ReplaceTypeVarsT: tyGenericBody" )
|
||||
result = replaceTypeVarsT(cl, lastSon(t))
|
||||
of tyFromExpr:
|
||||
var n = prepareNode(cl, t.n)
|
||||
n = cl.c.semExpr(cl.c, n, {})
|
||||
result = n.typ.skipTypes({tyTypeDesc})
|
||||
of tyInt:
|
||||
result = skipIntLit(t)
|
||||
# XXX now there are also float literals
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue