@@ -786,9 +786,6 @@ class Symbol {
786
786
inline Symbol &GetUltimate ();
787
787
inline const Symbol &GetUltimate () const ;
788
788
789
- // Get the specific procedure from a potential generic symbol.
790
- inline const Symbol *GetUltimateGeneric () const ;
791
-
792
789
inline DeclTypeSpec *GetType ();
793
790
inline const DeclTypeSpec *GetType () const ;
794
791
void SetType (const DeclTypeSpec &);
@@ -988,16 +985,6 @@ inline const Symbol &Symbol::GetUltimate() const {
988
985
}
989
986
}
990
987
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
-
1001
988
inline DeclTypeSpec *Symbol::GetType () {
1002
989
return const_cast <DeclTypeSpec *>(
1003
990
const_cast <const Symbol *>(this )->GetType ());
@@ -1027,6 +1014,10 @@ inline const DeclTypeSpec *Symbol::GetTypeImpl(int depth) const {
1027
1014
[&](const HostAssocDetails &x) {
1028
1015
return x.symbol ().GetTypeImpl (depth);
1029
1016
},
1017
+ [&](const GenericDetails &x) {
1018
+ const Symbol *symbol{x.specific ()};
1019
+ return symbol ? symbol->GetTypeImpl (depth) : nullptr ;
1020
+ },
1030
1021
[](const auto &) -> const DeclTypeSpec * { return nullptr ; },
1031
1022
},
1032
1023
details_);
0 commit comments