aboutsummaryrefslogtreecommitdiff
path: root/src/checker_signature.rs
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2026-05-08 10:36:46 +0100
committertslil <tslil@posteo.de>2026-05-08 10:53:51 +0100
commita73c34fc2e6b2dbe3ba8f4466851b03d29c016d4 (patch)
tree796e482cc5f2a401add3dea02a8aac0236155a1d /src/checker_signature.rs
parent77e215d06ac471dbbdbca3aaa2940f0c77580ac8 (diff)
fix bug in project: we were not substituting into the looked up field setHEADmain
Diffstat (limited to 'src/checker_signature.rs')
-rw-r--r--src/checker_signature.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/checker_signature.rs b/src/checker_signature.rs
index 39a35b4..cc5560d 100644
--- a/src/checker_signature.rs
+++ b/src/checker_signature.rs
@@ -90,7 +90,7 @@ impl CheckerState {
let mut new_fields = Vec::new();
for Field { carries, name } in fields {
let signature = ctx.check_signature(carries)?;
- ctx._recursively_add_hypothetical_instance(
+ ctx.recursively_add_hypothetical_instance(
name.clone(),
signature.clone(),
None,
@@ -106,7 +106,8 @@ impl CheckerState {
}
}
- fn _recursively_add_hypothetical_instance(
+ #[instrument(skip(self), level = "debug", fields(%name, %signature, head=%head.map(|s| s.to_string()).unwrap_or_default()) )]
+ fn recursively_add_hypothetical_instance(
&mut self,
name: String,
signature: Signature,
@@ -133,7 +134,7 @@ impl CheckerState {
self.add_instance(name.clone(), value, signature.clone())?;
if let Signature::Theory(fields) = signature {
for f in fields {
- self._recursively_add_hypothetical_instance(
+ self.recursively_add_hypothetical_instance(
f.name,
f.carries,
Some(&self_instance),
@@ -289,8 +290,10 @@ impl CheckerState {
owner: owner_signature,
} = self.lookup_signature_field(&field)?;
+ let field_signature = self.check_signature(field_signature)?;
+
if let Some(signature) = signature
- && !self.equal(signature, field_signature)
+ && !self.equal(signature, &field_signature)
{
return Err(CheckerError::WrongSignatureForInstance {
value: (*instance.clone()).into(),