From fce2ff161ea55bb73c076ab20d90730399a4059e Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 25 Feb 2015 21:36:43 +0100 Subject: tsigtypeop.nim works again --- compiler/semtypes.nim | 2 +- compiler/semtypinst.nim | 1 + compiler/sigmatch.nim | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler') diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 32a384f97..4e3823f42 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -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: diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 12fce1b84..452942ec0 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -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: diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index a782658b6..30d51aa29 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -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) -- cgit 1.4.1-2-gfad0