Update instantiate.rs

This commit is contained in:
Shunsuke Shibayama 2023-02-18 15:42:59 +09:00
parent d336dffba7
commit 5b8715af27

View file

@ -1073,9 +1073,9 @@ impl Context {
TokenKind::SubtypeOf => Constraint::new_subtype_of(
self.instantiate_typespec(&spec.t_spec, None, tv_cache, mode, true)?,
),
TokenKind::SupertypeOf => {
return type_feature_error!(self, spec.loc(), "supertype of");
}
TokenKind::SupertypeOf => Constraint::new_supertype_of(
self.instantiate_typespec(&spec.t_spec, None, tv_cache, mode, true)?,
),
TokenKind::Colon => Constraint::new_type_of(self.instantiate_typespec(
&spec.t_spec,
None,