diff --git a/frontend/include/chpl/resolution/can-pass.h b/frontend/include/chpl/resolution/can-pass.h index 80a71f5718fe..ac5790a7fa48 100644 --- a/frontend/include/chpl/resolution/can-pass.h +++ b/frontend/include/chpl/resolution/can-pass.h @@ -142,7 +142,7 @@ class CanPassResult { bool passes() { return !failReason_; } PassingFailureReason reason() { - CHPL_ASSERT(failReason_.hasValue()); + CHPL_ASSERT((bool) failReason_); return *failReason_; } diff --git a/frontend/include/chpl/resolution/resolution-types.h b/frontend/include/chpl/resolution/resolution-types.h index 56c64073a859..90e254e2efe8 100644 --- a/frontend/include/chpl/resolution/resolution-types.h +++ b/frontend/include/chpl/resolution/resolution-types.h @@ -2080,6 +2080,19 @@ template<> struct hash } }; +template<> struct hash +{ + size_t operator()(const chpl::resolution::CandidateFailureReason& key) const { + return (size_t) key; + } +}; + +template<> struct hash +{ + size_t operator()(const chpl::resolution::PassingFailureReason& key) const { + return (size_t) key; + } +}; } // end namespace std