Skip to content

Commit

Permalink
inferred_or_default when trying to hash
Browse files Browse the repository at this point in the history
  • Loading branch information
kuviman committed Nov 16, 2024
1 parent 6ee0626 commit 16d1d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl From<inference::Var<InferredType>> for Type {
impl TryHash for Type {
type Error = eyre::Report;
fn try_hash(&self, hasher: &mut impl std::hash::Hasher) -> Result<(), Self::Error> {
match self.inferred() {
match self.inferred_or_default()? {
Ok(ty) => ty.try_hash(hasher).map_err(|e| eyre!(e))?,
Err(_) => eyre::bail!("type is not inferred, fail to hash"),
}
Expand Down

0 comments on commit 16d1d86

Please sign in to comment.