Skip to content

Commit

Permalink
Use resolution results instead of modifying mask
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 27, 2024
1 parent 28c7013 commit c65670b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions frontend/lib/resolution/Resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4840,9 +4840,9 @@ bool Resolver::enter(const IndexableLoop* loop) {
if (!loopRequiresParallel) m |= IterDetails::SERIAL;
CHPL_ASSERT(m != IterDetails::NONE);

// For an explicit iterator call with a tag given, allow resolving any
// kind of iterator so it resolves to the tag.
auto runResult = context->runAndTrackErrors([&](Context* context) {
// For an explicit iterator call with a tag given, just resolve the call
// if possible.
context->runAndTrackErrors([&](Context* context) {
iterand->traverse(*this);
return nullptr;
});
Expand All @@ -4856,15 +4856,15 @@ bool Resolver::enter(const IndexableLoop* loop) {
if (fn->numFormals() > tagPos &&
fn->formalType(tagPos).type() ==
EnumType::getIterKindType(context)) {
if (!loopRequiresParallel) {
m = IterDetails::ANY;
}
idxType = iterandRE.type();
}
}
}

auto dt = resolveIterDetails(*this, loop, iterand, {}, m, &runResult.errors());
idxType = dt.idxType;
if (idxType.isUnknownOrErroneous()) {
auto dt = resolveIterDetails(*this, loop, iterand, {}, m);
idxType = dt.idxType;
}
}

enterScope(loop);
Expand Down

0 comments on commit c65670b

Please sign in to comment.