summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-04-13 01:46:13 +0200
committerAraq <rumpf_a@web.de>2013-04-13 01:46:13 +0200
commit4f09794be9fb9b96728078712f01e990e0021929 (patch)
treecf762c2ff2f99eecc2f7c8e7889b89f5e925fb4d
parenta3864aea23da4dfa126d1ae6b65d632ff4f98e77 (diff)
downloadNim-4f09794be9fb9b96728078712f01e990e0021929.tar.gz
fixes #244
-rw-r--r--compiler/semexprs.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 45b43e682..8b1e5aea1 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: