feat: impl polymorphic type declaration

This commit is contained in:
Shunsuke Shibayama 2023-06-04 01:34:20 +09:00
parent ea132e2345
commit 5052ebb077
10 changed files with 289 additions and 85 deletions

View file

@ -782,7 +782,7 @@ impl<'c, 'q, 'l, L: Locational> Dereferencer<'c, 'q, 'l, L> {
if self.ctx.supertype_of(&sub_t, &super_t) {
Ok(sub_t)
} else {
Err(TyCheckErrors::from(TyCheckError::subtyping_error(
Err(TyCheckErrors::from(TyCheckError::invariant_error(
self.ctx.cfg.input.clone(),
line!() as usize,
&sub_t,