diff options
Diffstat (limited to 'TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.tpp')
-rw-r--r-- | TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.tpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.tpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.tpp index c79d24db3b9..bc8b9ba131b 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.tpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.tpp @@ -38,7 +38,7 @@ namespace CCF template <typename T, typename Ptr> DeclarationRef<T, Ptr>:: DeclarationRef (DeclarationPtr decl) - : table_ (decl->table ()), + : table_ (decl->scope ()->table ()), name_ (decl->name ()), order_ (decl->order ()), initialized_ (true), @@ -89,10 +89,21 @@ namespace CCF lookup (ScopedName const& n) const throw (DeclarationNotFound, TypeMismatch) { - DeclarationPtr d (lookup (n, T::static_type_info ())); + IteratorPair pair = lookup (n); + + if (pair.first == pair.second) throw DeclarationNotFound (); + + for (; pair.first != pair.second; pair.first++) + { + DeclarationPtr d = (*pair.first); + + //@@ gcc bug + StrictPtr<T> p ((*pair.first)->template dynamic_type<T> ()); + + if (p != 0) return p; + } - //@@ gcc bug - return d->template dynamic_type<T> (); + throw TypeMismatch (); } |