summary refs log tree commit diff stats
path: root/compiler/transf.nim
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2018-04-10 11:14:59 +0100
committerAndreas Rumpf <rumpf_a@web.de>2018-04-10 12:14:59 +0200
commit16c1a90857992df0960f53f5ffa578f14059cee4 (patch)
tree6c012aa972c6e2f8e048ef533f4c97d3b642ccf4 /compiler/transf.nim
parent427490a845afa13c460d71c506994a24aae900c8 (diff)
downloadNim-16c1a90857992df0960f53f5ffa578f14059cee4.tar.gz
Cpp codegen: handling of imported exceptions. Fixes #3571 (#7360)
Diffstat (limited to 'compiler/transf.nim')
-rw-r--r--compiler/transf.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim
index 94899c5d4..e6dc69b38 100644
--- a/compiler/transf.nim
+++ b/compiler/transf.nim
@@ -714,7 +714,7 @@ proc transformCall(c: PTransf, n: PNode): PTransNode =
 
 proc transformExceptBranch(c: PTransf, n: PNode): PTransNode =
   result = transformSons(c, n)
-  if n[0].isInfixAs():
+  if n[0].isInfixAs() and (not isImportedException(n[0][1].typ)):
     let excTypeNode = n[0][1]
     let actions = newTransNode(nkStmtListExpr, n[1], 2)
     # Generating `let exc = (excType)(getCurrentException())`