update type check so that ++ with lists works better (#7926)

closes https://github.com/nushell/nushell/issues/7913
This commit is contained in:
Darren Schroeder 2023-01-31 13:11:05 -06:00 committed by GitHub
parent 517ef7cde7
commit 3fabc8e1e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,6 +84,7 @@ pub fn math_result_type(
} }
} }
(Type::Table(a), Type::Table(_)) => (Type::Table(a.clone()), None), (Type::Table(a), Type::Table(_)) => (Type::Table(a.clone()), None),
(Type::Any, _) | (_, Type::Any) => (Type::Any, None),
_ => { _ => {
*op = Expression::garbage(op.span); *op = Expression::garbage(op.span);
( (