fn track_seen(&mut self, param: &ParamType, seen: Option<ScalarType>) {
        use ParamType::*;

        self.seen.push(match param {
            AnyCompatible | ArrayAny | ListAny | ListAnyCompatible | MapAny | MapAnyCompatible
            | NonVecAny | RecordAny => seen,
            ArrayAnyCompatible => seen.map(|array| array.unwrap_array_element_type().clone()),
            ListElementAnyCompatible => seen.map(|el| ScalarType::List {
                custom_id: None,
                element_type: Box::new(el),
            }),
            o => {
                assert!(
                    !o.is_polymorphic(),
                    "polymorphic parameters must track types they encounter to determine polymorphic solution"
                );
                return;
            }
        });

        let compat_class = param
            .try_into()
            .expect("already returned for non-polymorphic params");

        match &self.compat {
            None => self.compat = Some(compat_class),
            Some(c) => {
                assert_eq!(
                    c, &compat_class,
                    "do not know how to correlate polymorphic classes {:?} and {:?}",
                    c, &compat_class,
                )
            }
        };
    }
/// Determines the desired type of polymorphic compatibility, as well as the
/// values to determine a polymorphic solution.
Determines the desired type of polymorphic compatibility, as well as the
values to determine a polymorphic solution.
Determines the desired type of polymorphic compatibility as well as the values to determine a polymorphic solution .
fn track_seen(&mut self, param: &ParamType, seen: Option<ScalarType>) {
        use ParamType::*;
        self.seen.push(match param {
            AnyCompatible | ArrayAny | ListAny | ListAnyCompatible | MapAny | MapAnyCompatible
            | NonVecAny | RecordAny => seen,
            ArrayAnyCompatible => seen.map(|array| array.unwrap_array_element_type().clone()),
            ListElementAnyCompatible => seen.map(|el| ScalarType::List {
                custom_id: None,
                element_type: Box::new(el),
            }),
            o => {
                assert!(
                    !o.is_polymorphic(),
                    "polymorphic parameters must track types they encounter to determine polymorphic solution"
                );
                return;
            }
        });
        let compat_class = param
            .try_into()
            .expect("already returned for non-polymorphic params");
        match &self.compat {
            None => self.compat = Some(compat_class),
            Some(c) => {
                assert_eq!(
                    c, &compat_class,
                    "do not know how to correlate polymorphic classes {:?} and {:?}",
                    c, &compat_class,
                )
            }
        };
    }
fn track_seen ( & mut self , param : & ParamType , seen : Option < ScalarType > ) { use ParamType :: * ; self . seen . push ( match param { AnyCompatible | ArrayAny | ListAny | ListAnyCompatible | MapAny | MapAnyCompatible | NonVecAny | RecordAny => seen , ArrayAnyCompatible => seen . map ( | array | array . unwrap_array_element_type ( ) . clone ( ) ) , ListElementAnyCompatible => seen . map ( | el | ScalarType :: List { custom_id : None , element_type : Box :: new ( el ) , } ) , o => { assert ! ( o is_polymorphic ( ) " " ) ; return ; } } ) ; let compat_class = param . try_into ( ) . expect ( " " ) ; match & self . compat { None => self . compat = Some ( compat_class ) , Some ( c ) => { assert_eq ! ( c compat_class " " c compat_class ) } } ; }
Determines the desired type of polymorphic compatibility, as well as the
values to determine a polymorphic solution.
Determines the desired type of polymorphic compatibility as well as the values to determine a polymorphic solution .
&mut self
param
&ParamType
seen
Option<ScalarType>
&mut self
param
&ParamType
seen
Option<ScalarType>