Remove unused record destructuring tests

These tests were for record destructuring, which has been removed.
The code for record destructuring was also removed from the type checker
and types modules.
This commit is contained in:
Michael Schimmel
2026-02-26 10:58:46 +01:00
parent 81c805f07e
commit 2ad2eb5d43
5 changed files with 1 additions and 54 deletions
+1 -12
View File
@@ -299,16 +299,6 @@ impl StaticType {
.zip(other_elements.iter())
.all(|(e, o)| e.is_assignable_from(o))
}
// Record to Tuple (Destructuring by values)
(StaticType::Tuple(elements), StaticType::Record(fields)) => {
if elements.len() != fields.len() {
return false;
}
elements
.iter()
.zip(fields.iter().map(|(_, ty)| ty))
.all(|(e, o)| e.is_assignable_from(o))
}
// A Matrix is a Vector (of Vectors/Matrices)
(StaticType::Vector(inner, len), StaticType::Matrix(m_inner, shape)) => {
if shape.is_empty() || shape[0] != *len {
@@ -367,11 +357,10 @@ impl Value {
}
}
/// Returns the underlying values as a slice if this is a Tuple or Record.
/// Returns the underlying values as a slice if this is a Tuple.
pub fn as_slice(&self) -> Option<&[Value]> {
match self {
Value::Tuple(v) => Some(v),
Value::Record(r) => Some(&r.values),
_ => None,
}
}