Skip to content

Commit

Permalink
Refactor to include manageability check
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Rift <anna.rift@hpe.com>
  • Loading branch information
riftEmber committed Sep 11, 2024
1 parent 8176e35 commit 5d9f013
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/lib/resolution/resolution-queries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1632,15 +1632,13 @@ QualifiedType getInstantiationType(Context* context,

// which BasicClassType to use?
const BasicClassType* bct;
if (auto formalBct = formalCt->basicClassType()) {
auto formalBct = formalCt->basicClassType();
if (formalBct && getTypeGenericity(context, bct) == Type::CONCRETE) {
bct = formalBct;
} else {
CHPL_ASSERT(formalCt->manageableType()->toManageableType());
bct = actualCt->basicClassType();
}
if (getTypeGenericity(context, bct) != Type::CONCRETE) {
bct = actualCt->basicClassType();
}

// now construct the ClassType
auto ct = ClassType::get(context, bct, manager, dec);
Expand Down

0 comments on commit 5d9f013

Please sign in to comment.