pub fn fun(&self, name: &DirectName, ctx: &Context, pos: &Position) -> TypeResult<FunUnion> {
        let union: HashSet<Function> =
            self.union.iter().map(|c| c.fun(name, ctx, pos)).collect::<Result<_, _>>()?;
        if union.is_empty() {
            let msg = format!("'{}' does not define function '{}'", self.name(), name);
            return Err(vec![TypeErr::new(pos, &msg)]);
        }

        Ok(FunUnion { union })
    }
/// Check if ClassUnion implements a function.
Check if ClassUnion implements a function.
Check if ClassUnion implements a function .
pub fn fun(&self, name: &DirectName, ctx: &Context, pos: &Position) -> TypeResult<FunUnion> {
        let union: HashSet<Function> =
            self.union.iter().map(|c| c.fun(name, ctx, pos)).collect::<Result<_, _>>()?;
        if union.is_empty() {
            let msg = format!("'{}' does not define function '{}'", self.name(), name);
            return Err(vec![TypeErr::new(pos, &msg)]);
        }
        Ok(FunUnion { union })
    }
pub fn fun ( & self , name : & DirectName , ctx : & Context , pos : & Position ) -> TypeResult < FunUnion > { let union : HashSet < Function > = self . union . iter ( ) . map ( | c | c . fun ( name , ctx , pos ) ) . collect :: < Result < _ , _ > > ( ) ? ; if union . is_empty ( ) { let msg = format ! ( " " self name ( ) name ) ; return Err ( vec ! [ TypeErr new ( pos msg ) ] ) ; } Ok ( FunUnion { union } ) }
Check if ClassUnion implements a function.
Check if ClassUnion implements a function .
&self
name
&DirectName
ctx
&Context
pos
&Position