Skip to content

Commit

Permalink
enable field used before init error
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmad Rezaii <[email protected]>
  • Loading branch information
arezaii committed Jan 8, 2025
1 parent 6642d82 commit 56bb7bf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/lib/resolution/Resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3137,9 +3137,8 @@ checkForErrorUseBeforeDefine(Context* context, const AstNode* node,
// resolved to an identifier defined later
// check if this is a field that is not initialized?
if (parsing::idIsField(context, target)) {
// skip for now and let prod handle
return false;
//CHPL_REPORT(context, FieldUsedBeforeInitialized, node, target);
// field used before initialized
CHPL_REPORT(context, FieldUsedBeforeInitialized, node, target);
} else {
CHPL_REPORT(context, UseOfLaterVariable, node, target);
}
Expand Down

0 comments on commit 56bb7bf

Please sign in to comment.