diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-06-30 17:22:46 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-06-30 17:22:46 +0000 |
commit | ae95b756112732ce38879a01877bab565a86d0a2 (patch) | |
tree | b4e5eb73d2ac1b4e4a2f0b71b559ad719a758ab2 /TAO/TAO_IDL/util | |
parent | eb5a771fc4c4a445146664b6cb00204e2d8b5468 (diff) | |
download | ATCD-ae95b756112732ce38879a01877bab565a86d0a2.tar.gz |
Change to lookup_by_name.
Diffstat (limited to 'TAO/TAO_IDL/util')
-rw-r--r-- | TAO/TAO_IDL/util/utl_scope.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp index d2f20dd8ef9..65f69b39449 100644 --- a/TAO/TAO_IDL/util/utl_scope.cpp +++ b/TAO/TAO_IDL/util/utl_scope.cpp @@ -1028,20 +1028,24 @@ UTL_Scope::lookup_by_name (UTL_ScopedName *e, // Are we a type, rather than an identifier? if (t != NULL) { - UTL_Scope *s = ScopeAsDecl (this)->defined_in (); - - if (s != NULL) + // Are we defined in this scope or just referenced? + if (d->defined_in () == this) { - AST_Decl *parent = ScopeAsDecl (s); + UTL_Scope *s = ScopeAsDecl (this)->defined_in (); - // If the scope we are defined in is itself inside - // an interface or valuetype, then we should also - // be exported to the interface (or valuetype) scope. - if (parent->node_type () == AST_Decl::NT_interface) + if (s != NULL) { - s->add_to_referenced (d, - I_FALSE, - d->local_name ()); + AST_Decl *parent = ScopeAsDecl (s); + + // If the scope we are defined in is itself inside + // an interface or valuetype, then we should also + // be exported to the interface (or valuetype) scope. + if (parent->node_type () == AST_Decl::NT_interface) + { + s->add_to_referenced (d, + I_FALSE, + d->local_name ()); + } } } } |