/// Check whether a local is in a particular `Kind`
/// If the local does not exist return a `VMError`.
Check whether a local is in a particular `Kind`
If the local does not exist return a `VMError`.
Check whether a local is in a particular ` Kind ` If the local does not exist return a ` VMError ` .
pub fn local_kind_is(&self, i: usize, kind: Kind) -> Result<bool, VMError> {
        if let Some((abstract_value, _)) = self.locals.get(&i) {
            Ok(abstract_value.kind == kind)
        } else {
            Err(VMError::new(format!("Local does not exist at index {}", i)))
        }
    }
pub fn local_kind_is ( & self , i : usize , kind : Kind ) -> Result < bool , VMError > { if let Some ( ( abstract_value , _ ) ) = self . locals . get ( & i ) { Ok ( abstract_value . kind == kind ) } else { Err ( VMError :: new ( format ! ( " " i ) ) ) } }
Check whether a local is in a particular `Kind`
If the local does not exist return a `VMError`.
Check whether a local is in a particular ` Kind ` If the local does not exist return a ` VMError ` .
&self
i
usize
kind
Kind