From 4f09794be9fb9b96728078712f01e990e0021929 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 13 Apr 2013 01:46:13 +0200 Subject: [PATCH] fixes #244 --- compiler/semexprs.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 45b43e682d..8b1e5aea1c 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -547,6 +547,10 @@ proc analyseIfAddressTakenInCall(c: PContext, n: PNode) = LocalError(n.sons[i].info, errVarForOutParamNeeded) return for i in countup(1, sonsLen(n) - 1): + if n.sons[i].kind == nkHiddenCallConv: + # we need to recurse explicitly here as converters can create nested + # calls and then they wouldn't be analysed otherwise + analyseIfAddressTakenInCall(c, n.sons[i]) semProcvarCheck(c, n.sons[i]) if i < sonsLen(t) and skipTypes(t.sons[i], abstractInst-{tyTypeDesc}).kind == tyVar: