~ubuntu-branches/ubuntu/utopic/kdevelop-php/utopic

« back to all changes in this revision

Viewing changes to duchain/builders/declarationbuilder.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2010-05-18 12:21:48 UTC
  • mto: (5.1.1 squeeze) (1.1.5)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20100518122148-04mq5800fnjfbs48
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
199
199
    DUChainWriteLocker lock(DUChain::lock());
200
200
    while (curClass->baseClassesSize() > 0) {
201
201
        StructureType::Ptr type;
202
 
        FOREACH_FUNCTION(BaseClassInstance base, curClass->baseClasses) {
 
202
        FOREACH_FUNCTION(const BaseClassInstance& base, curClass->baseClasses) {
203
203
            DUChainReadLocker lock(DUChain::lock());
204
204
            type = base.baseClass.type<StructureType>();
205
205
            if (!type) {
650
650
                                            AstNode* node)
651
651
{
652
652
    // we must not re-assign $this in a class context
653
 
    if ( identifier == QualifiedIdentifier("this")
 
653
    if ( identifier == thisQId
654
654
            && currentContext()->parentContext()
655
655
            && currentContext()->parentContext()->type() == DUContext::Class ) {
656
656
        reportError(i18n("Cannot re-assign $this."), QList<AstNode*>() << node);
737
737
}
738
738
 
739
739
DUContext* getClassContext(const QualifiedIdentifier &identifier, DUContext* currentCtx) {
740
 
    if ( identifier == QualifiedIdentifier("this") ) {
 
740
    if ( identifier == thisQId ) {
741
741
        if ( currentCtx->parentContext() && currentCtx->parentContext()->type() == DUContext::Class ) {
742
742
            return currentCtx->parentContext();
743
743
        }