Skip to content

Commit

Permalink
Doc comment for eq_user
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebenfield committed Dec 19, 2024
1 parent 8aa7a2f commit 8385050
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/passes/src/type_checking/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, _)
Expand Down

0 comments on commit 8385050

Please sign in to comment.