@@ -786,9 +786,6 @@ class Symbol {
786786 inline Symbol &GetUltimate ();
787787 inline const Symbol &GetUltimate () const ;
788788
789- // Get the specific procedure from a potential generic symbol.
790- inline const Symbol *GetUltimateGeneric () const ;
791-
792789 inline DeclTypeSpec *GetType ();
793790 inline const DeclTypeSpec *GetType () const ;
794791 void SetType (const DeclTypeSpec &);
@@ -988,16 +985,6 @@ inline const Symbol &Symbol::GetUltimate() const {
988985 }
989986}
990987
991- inline const Symbol *Symbol::GetUltimateGeneric () const {
992- if (this ->has <GenericDetails>())
993- return this ;
994- if (const auto *details{detailsIf<UseDetails>()})
995- return details->symbol ().GetUltimateGeneric ();
996- if (const auto *details{detailsIf<HostAssocDetails>()})
997- return details->symbol ().GetUltimateGeneric ();
998- return nullptr ;
999- }
1000-
1001988inline DeclTypeSpec *Symbol::GetType () {
1002989 return const_cast <DeclTypeSpec *>(
1003990 const_cast <const Symbol *>(this )->GetType ());
@@ -1027,6 +1014,10 @@ inline const DeclTypeSpec *Symbol::GetTypeImpl(int depth) const {
10271014 [&](const HostAssocDetails &x) {
10281015 return x.symbol ().GetTypeImpl (depth);
10291016 },
1017+ [&](const GenericDetails &x) {
1018+ const Symbol *symbol{x.specific ()};
1019+ return symbol ? symbol->GetTypeImpl (depth) : nullptr ;
1020+ },
10301021 [](const auto &) -> const DeclTypeSpec * { return nullptr ; },
10311022 },
10321023 details_);
0 commit comments