diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-01-30 22:34:19 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-01-30 22:34:19 +0100 |
| commit | 4253c1c20013ab16564aa3ec34585dd1a358d182 (patch) | |
| tree | f1d96d0aa8c4af949b1284129d6366d697139bb0 /src/lib.rs | |
| parent | 1a82b85817646aded501051f4e9d651f7c0d4970 (diff) | |
| download | sylt-4253c1c20013ab16564aa3ec34585dd1a358d182.tar.gz | |
add in tuples
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -408,6 +408,7 @@ pub enum Op { Constant(Value), Tuple(usize), + Index, Get(String), Set(String), @@ -590,6 +591,9 @@ impl PartialEq for Type { (Type::Float, Type::Float) => true, (Type::Bool, Type::Bool) => true, (Type::String, Type::String) => true, + (Type::Tuple(a), Type::Tuple(b)) => { + a.iter().zip(b.iter()).all(|(a, b)| a == b) + } (Type::Function(a_args, a_ret), Type::Function(b_args, b_ret)) => a_args == b_args && a_ret == b_ret, _ => false, |
