Check in gen test for record decoding!

This commit is contained in:
Ayaz Hafiz 2022-08-14 13:18:44 -05:00
parent 44a746b473
commit 60ed17155c
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 12 additions and 8 deletions

View file

@ -584,7 +584,15 @@ trait DerivableVisitor {
let descend = Self::visit_record(var)?;
if descend.0 {
push_var_slice!(fields.variables());
stack.push(ext);
if !matches!(
subs.get_content_without_compacting(ext),
Content::FlexVar(_) | Content::RigidVar(_)
) {
// TODO: currently, just we suppose the presence of a flex var may
// include more or less things which we can derive. But, we should
// instead recurse here, and add a `t ~ u | u has Decode` constraint as needed.
stack.push(ext);
}
}
}
TagUnion(tags, ext) => {