From 838505045fc2eeb7bafcc81b1f3c5b8829b420ff Mon Sep 17 00:00:00 2001 From: Michael Benfield Date: Thu, 19 Dec 2024 14:25:30 -0800 Subject: [PATCH] Doc comment for eq_user --- compiler/passes/src/type_checking/checker.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/passes/src/type_checking/checker.rs b/compiler/passes/src/type_checking/checker.rs index a3e50920ff..f0abda9118 100644 --- a/compiler/passes/src/type_checking/checker.rs +++ b/compiler/passes/src/type_checking/checker.rs @@ -1103,6 +1103,11 @@ impl<'a, N: Network> TypeChecker<'a, N> { }); } + /// Are the types considered eq as far as the Leo user is concerned? + /// + /// In particular, any comparison involving an `Err` is `true`, + /// composite types are resolved to the current program if not specified, + /// and Futures which aren't explicit compare equal to other Futures. pub(crate) fn eq_user(&self, t1: &Type, t2: &Type) -> bool { match (t1, t2) { (Type::Err, _)