From 12b11fd848f68ce0543c6e0dc705b6d445e00146 Mon Sep 17 00:00:00 2001 From: cooldome Date: Mon, 29 Jan 2018 04:59:49 +0000 Subject: Fix compiler crash on try expression with infix as (Fixes #7116) (#7112) * Fix compiler crash * make sure type is not lost --- compiler/transf.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/transf.nim') diff --git a/compiler/transf.nim b/compiler/transf.nim index 14ff58c90..94899c5d4 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -716,7 +716,7 @@ proc transformExceptBranch(c: PTransf, n: PNode): PTransNode = result = transformSons(c, n) if n[0].isInfixAs(): let excTypeNode = n[0][1] - let actions = newTransNode(nkStmtList, n[1].info, 2) + let actions = newTransNode(nkStmtListExpr, n[1], 2) # Generating `let exc = (excType)(getCurrentException())` # -> getCurrentException() let excCall = PTransNode(callCodegenProc("getCurrentException", ast.emptyNode)) -- cgit 1.4.1-2-gfad0