fixes #7215
This commit is contained in:
parent
83a8019027
commit
89782460a3
3 changed files with 7 additions and 4 deletions
|
|
@ -1661,7 +1661,7 @@ proc isException*(t: PType): bool =
|
||||||
# check if `y` is object type and it inherits from Exception
|
# check if `y` is object type and it inherits from Exception
|
||||||
assert(t != nil)
|
assert(t != nil)
|
||||||
|
|
||||||
if t.kind != tyObject:
|
if t.kind != tyObject:
|
||||||
return false
|
return false
|
||||||
|
|
||||||
var base = t
|
var base = t
|
||||||
|
|
|
||||||
|
|
@ -1467,7 +1467,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
||||||
"request to create a NimNode of invalid kind")
|
"request to create a NimNode of invalid kind")
|
||||||
let cc = regs[rc].node
|
let cc = regs[rc].node
|
||||||
|
|
||||||
regs[ra].node = newNodeI(TNodeKind(int(k)),
|
let x = newNodeI(TNodeKind(int(k)),
|
||||||
if cc.kind != nkNilLit:
|
if cc.kind != nkNilLit:
|
||||||
cc.info
|
cc.info
|
||||||
elif c.comesFromHeuristic.line > -1:
|
elif c.comesFromHeuristic.line > -1:
|
||||||
|
|
@ -1476,7 +1476,10 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
||||||
c.callsite[1].info
|
c.callsite[1].info
|
||||||
else:
|
else:
|
||||||
c.debug[pc])
|
c.debug[pc])
|
||||||
regs[ra].node.flags.incl nfIsRef
|
x.flags.incl nfIsRef
|
||||||
|
# prevent crashes in the compiler resulting from wrong macros:
|
||||||
|
if x.kind == nkIdent: x.ident = getIdent""
|
||||||
|
regs[ra].node = x
|
||||||
of opcNCopyNimNode:
|
of opcNCopyNimNode:
|
||||||
decodeB(rkNode)
|
decodeB(rkNode)
|
||||||
regs[ra].node = copyNode(regs[rb].node)
|
regs[ra].node = copyNode(regs[rb].node)
|
||||||
|
|
|
||||||
|
|
@ -711,7 +711,7 @@ proc mapLitsImpl(constructor: NimNode; op: NimNode; nested: bool;
|
||||||
result.add op
|
result.add op
|
||||||
result.add constructor
|
result.add constructor
|
||||||
else:
|
else:
|
||||||
result = newNimNode(constructor.kind, lineInfoFrom=constructor)
|
result = copyNimNode(constructor)
|
||||||
for v in constructor:
|
for v in constructor:
|
||||||
if nested or v.kind in filter:
|
if nested or v.kind in filter:
|
||||||
result.add mapLitsImpl(v, op, nested, filter)
|
result.add mapLitsImpl(v, op, nested, filter)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue