tsigtypeop.nim works again

This commit is contained in:
Araq
2015-02-25 21:36:43 +01:00
parent 975f33b01d
commit fce2ff161e
3 changed files with 3 additions and 3 deletions

View File

@@ -1193,7 +1193,7 @@ proc semTypeNode(c: PContext, n: PNode, prev: PType): PType =
result = typeExpr.typ.base
if result.isMetaType:
var preprocessed = semGenericStmt(c, n)
result = makeTypeFromExpr(c, preprocessed)
result = makeTypeFromExpr(c, preprocessed.copyTree)
of nkIdent, nkAccQuoted:
var s = semTypeIdent(c, n)
if s.typ == nil:

View File

@@ -369,6 +369,7 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType =
of tyFromExpr:
if cl.allowMetaTypes: return
assert t.n.typ != t
var n = prepareNode(cl, t.n)
n = cl.c.semConstExpr(cl.c, n)
if n.typ.kind == tyTypeDesc:

View File

@@ -1187,8 +1187,7 @@ proc paramTypesMatchAux(m: var TCandidate, f, argType: PType,
if argType.kind == tyStatic:
if m.callee.kind == tyGenericBody and tfGenericTypeParam notin argType.flags:
result = newNodeI(nkType, argOrig.info)
result.typ = makeTypeFromExpr(c, arg)
result = newNodeIT(nkType, argOrig.info, makeTypeFromExpr(c, arg))
return
else:
var evaluated = c.semTryConstExpr(c, arg)