From 56bb7bf11e2d1d5459021ac84b3d754cb8a271db Mon Sep 17 00:00:00 2001 From: Ahmad Rezaii Date: Mon, 6 Jan 2025 11:08:39 -0700 Subject: [PATCH] enable field used before init error Signed-off-by: Ahmad Rezaii --- frontend/lib/resolution/Resolver.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/lib/resolution/Resolver.cpp b/frontend/lib/resolution/Resolver.cpp index 97760fa1d5d6..fd4462630104 100644 --- a/frontend/lib/resolution/Resolver.cpp +++ b/frontend/lib/resolution/Resolver.cpp @@ -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); }