allow comparison for similar types (#5844)

This commit is contained in:
Fernando Herrera 2022-06-21 12:15:31 -05:00 committed by GitHub
parent 7164929c61
commit 44cbd88b55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,6 +216,10 @@ pub fn math_result_type(
(Type::Any, _) => (Type::Any, None),
(_, Type::Any) => (Type::Any, None),
// FIX ME. This is added because there is no type output for custom function
// definitions. As soon as that syntax is added this should be removed
(a, b) if a == b => (Type::Bool, None),
_ => {
*op = Expression::garbage(op.span);
(