Refactor type inference for collections
The type inference for collections (tuples, vectors, matrices, and records) has been significantly refactored. This includes: - Introducing distinct `StaticType` variants for `Tuple`, `Vector`, and `Matrix`. - Implementing more robust type checking for these collections, allowing for homogeneous and heterogeneous structures. - Enhancing the `is_assignable_from` method to handle type compatibility between these collection types. - Updating `Value::static_type()` to correctly infer the types of literal collections. - Improving the type inference for map literals to create `Record` types. - Adding comprehensive unit tests for tuple, vector, matrix, and record type inference.
This commit is contained in:
@@ -87,7 +87,7 @@ mod tests {
|
||||
for entry in entries {
|
||||
let entry = entry.expect("Invalid entry");
|
||||
let path = entry.path();
|
||||
if path.extension().map_or(false, |ext| ext == "myc") {
|
||||
if path.extension().is_some_and(|ext| ext == "myc") {
|
||||
let content = fs::read_to_string(&path).expect("Could not read file");
|
||||
|
||||
// Find expected output tag: ;; Output: <value>
|
||||
|
||||
Reference in New Issue
Block a user