fix bug in uniq isEq type

it always wanted Boolean arguments ...
This commit is contained in:
Folkert 2020-03-13 13:06:37 +01:00
parent e01a6bab9b
commit 9ef4a6d891
2 changed files with 25 additions and 11 deletions

View file

@ -397,13 +397,13 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
// isEq or (==) : Attr u1 Bool, Attr u2 Bool -> Attr u3 Bool
add_type(
Symbol::BOOL_EQ,
unique_function(vec![bool_type(UVAR1), bool_type(UVAR2)], bool_type(UVAR3)),
unique_function(vec![flex(TVAR1), flex(TVAR2)], bool_type(UVAR3)),
);
// isNeq or (!=) : Attr u1 Bool, Attr u2 Bool -> Attr u3 Bool
add_type(
Symbol::BOOL_NEQ,
unique_function(vec![bool_type(UVAR1), bool_type(UVAR2)], bool_type(UVAR3)),
unique_function(vec![flex(TVAR1), flex(TVAR2)], bool_type(UVAR3)),
);
// and or (&&) : Attr u1 Bool, Attr u2 Bool -> Attr u3 Bool