fn fix_types(&mut self, generated_params: &mut Vec<Type>) {
        if self.parent.parent.env.has_errors() {
            return;
        }
        for i in self.node_counter_start..self.parent.node_counter {
            let node_id = NodeId::new(i);
            if let Some(ty) = self.parent.type_map.get(&node_id).cloned() {
                let ty = self.fix_type(generated_params, &ty);
                self.parent.type_map.insert(node_id, ty);
            }
            if let Some(inst) = self.parent.instantiation_map.get(&node_id) {
                let inst = inst
                    .clone()
                    .into_iter()
                    .map(|ty| self.fix_type(generated_params, &ty))
                    .collect_vec();
                self.set_instantiation(node_id, inst);
            }
        }
    }
/// Fix any free type variables remaining in this expression translator to a freshly
/// generated type parameter, adding them to the passed vector.
Fix any free type variables remaining in this expression translator to a freshly
generated type parameter, adding them to the passed vector.
Fix any free type variables remaining in this expression translator to a freshly generated type parameter adding them to the passed vector .
fn fix_types(&mut self, generated_params: &mut Vec<Type>) {
        if self.parent.parent.env.has_errors() {
            return;
        }
        for i in self.node_counter_start..self.parent.node_counter {
            let node_id = NodeId::new(i);
            if let Some(ty) = self.parent.type_map.get(&node_id).cloned() {
                let ty = self.fix_type(generated_params, &ty);
                self.parent.type_map.insert(node_id, ty);
            }
            if let Some(inst) = self.parent.instantiation_map.get(&node_id) {
                let inst = inst
                    .clone()
                    .into_iter()
                    .map(|ty| self.fix_type(generated_params, &ty))
                    .collect_vec();
                self.set_instantiation(node_id, inst);
            }
        }
    }
fn fix_types ( & mut self , generated_params : & mut Vec < Type > ) { if self . parent . parent . env . has_errors ( ) { return ; } for i in self . node_counter_start .. self . parent . node_counter { let node_id = NodeId :: new ( i ) ; if let Some ( ty ) = self . parent . type_map . get ( & node_id ) . cloned ( ) { let ty = self . fix_type ( generated_params , & ty ) ; self . parent . type_map . insert ( node_id , ty ) ; } if let Some ( inst ) = self . parent . instantiation_map . get ( & node_id ) { let inst = inst . clone ( ) . into_iter ( ) . map ( | ty | self . fix_type ( generated_params , & ty ) ) . collect_vec ( ) ; self . set_instantiation ( node_id , inst ) ; } } }
Fix any free type variables remaining in this expression translator to a freshly
generated type parameter, adding them to the passed vector.
Fix any free type variables remaining in this expression translator to a freshly generated type parameter adding them to the passed vector .
&mut self
generated_params
&mut Vec<Type>
&mut self
generated_params
&mut Vec<Type>