implemented Result.isErr

This commit is contained in:
Theo Felippe 2021-11-13 08:29:40 +00:00
parent bb3a9c4138
commit 10eab4b785
4 changed files with 116 additions and 0 deletions

View file

@ -1381,6 +1381,13 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
Box::new(bool_type()),
);
// isErr : Result * * -> bool
add_top_level_function_type!(
Symbol::RESULT_IS_ERR,
vec![result_type(flex(TVAR1), flex(TVAR3))],
Box::new(bool_type()),
);
types
}