iter 22b.2.1: add Constraint struct, Type::Forall.constraints
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user