[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdev-ruby] duchain/builders: Set access policy to public by default when visiting the singleton cla
From:       Alexander Dymo <adymo () kdevelop ! org>
Date:       2012-10-23 17:32:30
Message-ID: 20121023173230.23904A6078 () git ! kde ! org
[Download RAW message or body]

Git commit 06a8b0474dc3cf98912a81bfdf2b55c28edded45 by Alexander Dymo.
Committed on 23/10/2012 at 19:29.
Pushed by dymo into branch 'master'.

Set access policy to public by default when visiting the singleton class.
This fixes the crash as specified in duchain/singletonMethodVisibility test.

M  +2    -0    duchain/builders/declarationbuilder.cpp

http://commits.kde.org/kdev-ruby/06a8b0474dc3cf98912a81bfdf2b55c28edded45

diff --git a/duchain/builders/declarationbuilder.cpp b/duchain/builders/declarationbuilder.cpp
index 565d798..72949e4 100644
--- a/duchain/builders/declarationbuilder.cpp
+++ b/duchain/builders/declarationbuilder.cpp
@@ -197,7 +197,9 @@ void DeclarationBuilder::visitSingletonClass(RubyAst *node)
     }
 
     node->tree = aux;
+    m_accessPolicy.push(Declaration::Public);
     RubyAstVisitor::visitSingletonClass(node);
+    m_accessPolicy.pop();
     if (m_injected) {
         closeInjectedContext();
         m_injected = false;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic