We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 864133c commit f0c5a4dCopy full SHA for f0c5a4d
flang/lib/Evaluate/type.cpp
@@ -215,7 +215,15 @@ static const semantics::Symbol *FindParentComponent(
215
}
216
if (scope) {
217
const auto &dtDetails{typeSymbol.get<semantics::DerivedTypeDetails>()};
218
- return dtDetails.GetParentComponent(*scope);
+ // TODO: Combine with semantics::DerivedTypeDetails::GetParentComponent
219
+ if (auto extends{dtDetails.GetParentComponentName()}) {
220
+ if (auto iter{scope->find(*extends)}; iter != scope->cend()) {
221
+ if (const semantics::Symbol & symbol{*iter->second};
222
+ symbol.test(semantics::Symbol::Flag::ParentComp)) {
223
+ return &symbol;
224
+ }
225
226
227
228
return nullptr;
229
0 commit comments