diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index a1572c85e..87d196fad 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -304,8 +304,8 @@ proc addToIntersection(inter: var TIntersection, s: int) = proc throws(tracked, n, orig: PNode) = if n.typ == nil or n.typ.kind != tyError: if orig != nil: - let x = copyNode(n) - x.info = orig.info + let x = copyTree(orig) + x.typ = n.typ tracked.add x else: tracked.add n @@ -329,7 +329,7 @@ proc createTag(g: ModuleGraph; n: PNode): PNode = if not n.isNil: result.info = n.info proc addRaiseEffect(a: PEffects, e, comesFrom: PNode) = - assert e.kind != nkRaiseStmt + #assert e.kind != nkRaiseStmt var aa = a.exc for i in a.bottom.. 0: rr = rr.lastSon + localError(g.config, r.info, errGenerated, renderTree(rr) & " " & msg & typeToString(r.typ)) popInfoContext(g.config) # hint about unnecessarily listed exception types: if hints: