iter 22b.2.1: add Constraint struct, Type::Forall.constraints

This commit is contained in:
2026-05-09 17:34:39 +02:00
parent e1d748d64e
commit b636b883a3
14 changed files with 94 additions and 20 deletions
+2 -2
View File
@@ -1845,7 +1845,7 @@ impl<'a> Emitter<'a> {
))
})?;
let (forall_vars, params, ret) = match &fdef.ty {
Type::Forall { vars, body } => match body.as_ref() {
Type::Forall { vars, constraints: _, body } => match body.as_ref() {
Type::Fn { params, ret, .. } => {
(vars.clone(), params.clone(), (**ret).clone())
}
@@ -2434,7 +2434,7 @@ impl<'a> Emitter<'a> {
let cty = self.synth_with_extras(callee, extras)?;
match cty {
Type::Fn { ret, .. } => Ok(*ret),
Type::Forall { vars, body } => {
Type::Forall { vars, constraints: _, body } => {
let arg_tys: Vec<Type> = args
.iter()
.map(|a| self.synth_with_extras(a, extras))