Git commit 0b5562b8dcfd25a28c38b0aac89155d707927b07 by Alexander Dymo. Committed on 27/10/2012 at 01:07. Pushed by dymo into branch 'master'. This time correctly create context for the function body, even if it's empt= y. Make sure we add function parameters to the context even if it's empty. M +9 -10 duchain/builders/contextbuilder.cpp http://commits.kde.org/kdev-ruby/0b5562b8dcfd25a28c38b0aac89155d707927b07 diff --git a/duchain/builders/contextbuilder.cpp b/duchain/builders/context= builder.cpp index b2073c6..e0ba3c1 100644 --- a/duchain/builders/contextbuilder.cpp +++ b/duchain/builders/contextbuilder.cpp @@ -195,17 +195,16 @@ void ContextBuilder::visitMethodStatement(RubyAst *no= de) } = node->tree =3D aux->l; - if (node->tree && is_valid(node->tree)) { - DUContext *body =3D openContext(node, DUContext::Other, &name); - if (compilingContexts()) { - DUChainWriteLocker wlock(DUChain::lock()); - if (params) - body->addImportedParentContext(params); - body->setInSymbolTable(false); - } - visitBody(node); - closeContext(); + DUContext *body =3D openContext(node, DUContext::Other, &name); + if (compilingContexts()) { + DUChainWriteLocker wlock(DUChain::lock()); + if (params) + body->addImportedParentContext(params); + body->setInSymbolTable(false); } + if (node->tree && is_valid(node->tree)) + visitBody(node); + closeContext(); node->tree =3D aux; } =20