From c0fb1731619e52bd6690e60932238b5cc13386a1 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 15 May 2024 12:11:09 -0700 Subject: [PATCH] Make sure that the optional is reset instead of assigned the 0 value. Signed-off-by: Danila Fedorin --- frontend/lib/resolution/can-pass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/lib/resolution/can-pass.cpp b/frontend/lib/resolution/can-pass.cpp index 0e692fca95f9..1b3d84c3373e 100644 --- a/frontend/lib/resolution/can-pass.cpp +++ b/frontend/lib/resolution/can-pass.cpp @@ -1001,7 +1001,7 @@ CanPassResult CanPassResult::canPass(Context* context, // the formal. This suggests a generic actual being passed to the // formal; this is typically not allowed, but in this case // (canAcceptGenericActuals) it is. So, it's not an error. - got.failReason_ = {}; + got.failReason_ = chpl::optional(); return got; } if (!got.passes() && formalQT.isParam()) {