tsigtypeop.nim works again
This commit is contained in:
parent
975f33b01d
commit
fce2ff161e
3 changed files with 3 additions and 3 deletions
|
|
@ -1193,7 +1193,7 @@ proc semTypeNode(c: PContext, n: PNode, prev: PType): PType =
|
||||||
result = typeExpr.typ.base
|
result = typeExpr.typ.base
|
||||||
if result.isMetaType:
|
if result.isMetaType:
|
||||||
var preprocessed = semGenericStmt(c, n)
|
var preprocessed = semGenericStmt(c, n)
|
||||||
result = makeTypeFromExpr(c, preprocessed)
|
result = makeTypeFromExpr(c, preprocessed.copyTree)
|
||||||
of nkIdent, nkAccQuoted:
|
of nkIdent, nkAccQuoted:
|
||||||
var s = semTypeIdent(c, n)
|
var s = semTypeIdent(c, n)
|
||||||
if s.typ == nil:
|
if s.typ == nil:
|
||||||
|
|
|
||||||
|
|
@ -369,6 +369,7 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType =
|
||||||
|
|
||||||
of tyFromExpr:
|
of tyFromExpr:
|
||||||
if cl.allowMetaTypes: return
|
if cl.allowMetaTypes: return
|
||||||
|
assert t.n.typ != t
|
||||||
var n = prepareNode(cl, t.n)
|
var n = prepareNode(cl, t.n)
|
||||||
n = cl.c.semConstExpr(cl.c, n)
|
n = cl.c.semConstExpr(cl.c, n)
|
||||||
if n.typ.kind == tyTypeDesc:
|
if n.typ.kind == tyTypeDesc:
|
||||||
|
|
|
||||||
|
|
@ -1187,8 +1187,7 @@ proc paramTypesMatchAux(m: var TCandidate, f, argType: PType,
|
||||||
|
|
||||||
if argType.kind == tyStatic:
|
if argType.kind == tyStatic:
|
||||||
if m.callee.kind == tyGenericBody and tfGenericTypeParam notin argType.flags:
|
if m.callee.kind == tyGenericBody and tfGenericTypeParam notin argType.flags:
|
||||||
result = newNodeI(nkType, argOrig.info)
|
result = newNodeIT(nkType, argOrig.info, makeTypeFromExpr(c, arg))
|
||||||
result.typ = makeTypeFromExpr(c, arg)
|
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
var evaluated = c.semTryConstExpr(c, arg)
|
var evaluated = c.semTryConstExpr(c, arg)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue