diff --git a/src/types.rs b/src/types.rs index eab1cc2..1cd90d4 100644 --- a/src/types.rs +++ b/src/types.rs @@ -323,7 +323,9 @@ impl ArgumentType { (ArgumentType::Value(a), ArgumentType::Value(b)) => { Some(ArgumentType::Value(a.common_supertype(b)?)) } - + (Self::Stored(a), Self::Stored(b)) => { + Some(ArgumentType::Stored(a.common_supertype(b)?)) + } (ArgumentType::Aggregating(a), ArgumentType::Aggregating(b)) => { Some(ArgumentType::Aggregating(Box::new(a.common_supertype(b)?))) } @@ -345,6 +347,9 @@ impl Unify for ArgumentType { (ArgumentType::Value(a), ArgumentType::Value(b)) => { Ok(ArgumentType::Value(a.unify(b, table, spanned)?)) } + (ArgumentType::Stored(a), ArgumentType::Stored(b)) => { + Ok(ArgumentType::Stored(a.unify(b, table, spanned)?)) + } (ArgumentType::Aggregating(a), ArgumentType::Aggregating(b)) => Ok( ArgumentType::Aggregating(Box::new(a.unify(b, table, spanned)?)), ),