fix: in operator

* remove `In` trait, `__in__`, `__notin__` function
* desugar to `__contains__`
* impl Collection for Array, Set, Tuple
This commit is contained in:
Shunsuke Shibayama 2023-08-13 01:01:06 +09:00
parent 4f93c393c0
commit 2e9fb48f2e
19 changed files with 154 additions and 142 deletions

View file

@ -259,7 +259,7 @@ impl Context {
&'c self,
lhs: &Type,
rhs: &Type,
get_types: impl FnOnce(&'c Context) -> &'c [Type],
get_types: impl Fn(&'c Context) -> &'c [Type],
) -> (Credibility, bool) {
if let Some((typ, ty_ctx)) = self.get_nominal_type_ctx(rhs) {
let substitute = typ.has_qvar();