Skip to content

Commit

Permalink
Change a conditional into an assert
Browse files Browse the repository at this point in the history
---
Signed-off-by: Michael Ferguson <[email protected]>
  • Loading branch information
mppf committed Sep 6, 2024
1 parent 11779bd commit ae0e02b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions frontend/lib/parsing/parsing-queries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1444,10 +1444,9 @@ const ID& idToParentId(Context* context, ID id) {
// Detect that and return the parent module in that case.
if (result.isEmpty() && !parentSymbolPath.isEmpty()) {
ID parentSymbolId = id.parentSymbolId(context);
if (!parentSymbolId.isEmpty()) {
CHPL_ASSERT(parentSymbolId.symbolPath() == parentSymbolPath);
result = parentSymbolId;
}
CHPL_ASSERT(!parentSymbolId.isEmpty());
CHPL_ASSERT(parentSymbolId.symbolPath() == parentSymbolPath);
result = parentSymbolId;
}
}

Expand Down

0 comments on commit ae0e02b

Please sign in to comment.