diff options
Diffstat (limited to 'idlc/source/fehelper.cxx')
-rw-r--r-- | idlc/source/fehelper.cxx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/idlc/source/fehelper.cxx b/idlc/source/fehelper.cxx index a147d3d26e1a..607f5a145677 100644 --- a/idlc/source/fehelper.cxx +++ b/idlc/source/fehelper.cxx @@ -69,34 +69,34 @@ FeInheritanceHeader::FeInheritanceHeader( void FeInheritanceHeader::initializeInherits(OString const * pInherits) { - if ( pInherits ) + if ( !pInherits ) + return; + + AstScope* pScope = idlc()->scopes()->topNonNull(); + AstDeclaration* pDecl = pScope->lookupByName(*pInherits); + if ( pDecl ) { - AstScope* pScope = idlc()->scopes()->topNonNull(); - AstDeclaration* pDecl = pScope->lookupByName(*pInherits); - if ( pDecl ) + AstDeclaration const * resolved = resolveTypedefs(pDecl); + if ( resolved->getNodeType() == getNodeType() + && (resolved->getNodeType() != NT_interface + || static_cast< AstInterface const * >( + resolved)->isDefined()) ) { - AstDeclaration const * resolved = resolveTypedefs(pDecl); - if ( resolved->getNodeType() == getNodeType() - && (resolved->getNodeType() != NT_interface - || static_cast< AstInterface const * >( - resolved)->isDefined()) ) - { - if ( ErrorHandler::checkPublished( pDecl ) ) - { - m_pInherits = pDecl; - } - } - else + if ( ErrorHandler::checkPublished( pDecl ) ) { - ErrorHandler::inheritanceError( - getNodeType(), getName(), pDecl); + m_pInherits = pDecl; } } else { - ErrorHandler::lookupError(*pInherits); + ErrorHandler::inheritanceError( + getNodeType(), getName(), pDecl); } } + else + { + ErrorHandler::lookupError(*pInherits); + } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |