mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
tsigtypeop.nim works again
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user