diff options
author | Araq <rumpf_a@web.de> | 2015-02-25 21:36:43 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-02-25 21:36:43 +0100 |
commit | fce2ff161ea55bb73c076ab20d90730399a4059e (patch) | |
tree | 213708fe7802245c01193d080873d41e358a5f2c | |
parent | 975f33b01d65b68ac1fea5de23998864ca2b2b8f (diff) | |
download | Nim-fce2ff161ea55bb73c076ab20d90730399a4059e.tar.gz |
tsigtypeop.nim works again
-rw-r--r-- | compiler/semtypes.nim | 2 | ||||
-rw-r--r-- | compiler/semtypinst.nim | 1 | ||||
-rw-r--r-- | compiler/sigmatch.nim | 3 |
3 files changed, 3 insertions, 3 deletions
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) |