This commit is contained in:
Araq 2014-01-25 23:03:43 +01:00
commit 8a7f50889c
2 changed files with 4 additions and 2 deletions

View file

@ -116,8 +116,8 @@ proc hasGenericArguments*(n: PNode): bool =
(n.sym.kind == skType and (n.sym.kind == skType and
n.sym.typ.flags * {tfGenericTypeParam, tfImplicitTypeParam} != {}) n.sym.typ.flags * {tfGenericTypeParam, tfImplicitTypeParam} != {})
else: else:
for s in n.sons: for i in 0.. <n.safeLen:
if hasGenericArguments(s): return true if hasGenericArguments(n.sons[i]): return true
return false return false
proc reResolveCallsWithTypedescParams(cl: var TReplTypeVars, n: PNode): PNode = proc reResolveCallsWithTypedescParams(cl: var TReplTypeVars, n: PNode): PNode =

View file

@ -1057,6 +1057,7 @@ proc fixType(result, n: PNode) {.inline.} =
# XXX do it deeply for complex values; there seems to be no simple # XXX do it deeply for complex values; there seems to be no simple
# solution except to check it deeply here. # solution except to check it deeply here.
#if result.typ.isNil: result.typ = n.typ #if result.typ.isNil: result.typ = n.typ
discard
proc execute(c: PCtx, start: int): PNode = proc execute(c: PCtx, start: int): PNode =
var tos = PStackFrame(prc: nil, comesFrom: 0, next: nil) var tos = PStackFrame(prc: nil, comesFrom: 0, next: nil)
@ -1118,6 +1119,7 @@ proc evalConstExprAux(module, prc: PSym, n: PNode, mode: TEvalMode): PNode =
var c = globalCtx var c = globalCtx
c.mode = mode c.mode = mode
let start = genExpr(c, n, requiresValue = mode!=emStaticStmt) let start = genExpr(c, n, requiresValue = mode!=emStaticStmt)
if c.code[start].opcode == opcEof: return emptyNode
assert c.code[start].opcode != opcEof assert c.code[start].opcode != opcEof
var tos = PStackFrame(prc: prc, comesFrom: 0, next: nil) var tos = PStackFrame(prc: prc, comesFrom: 0, next: nil)
newSeq(tos.slots, c.prc.maxSlots) newSeq(tos.slots, c.prc.maxSlots)