fix bug where subtypes of list didn't include type of empty list

This commit is contained in:
Mark
2024-01-16 12:00:16 +01:00
parent 2d373d1ba7
commit 9fe981fc6c
3 changed files with 5 additions and 3 deletions

View File

@@ -299,6 +299,8 @@ impl MersType for ListT {
for t in self.0.subtypes_type().types {
acc.add(Arc::new(Self(Type::newm(vec![t]))));
}
// The type of an empty list is a list where the items are `<unreachable>`
acc.add(Arc::new(Self(Type::empty())));
}
fn as_any(&self) -> &dyn std::any::Any {
self