MCPcopy Index your code
hub / github.com/RustPython/RustPython / type_check

Function type_check

crates/jit/src/lib.rs:285–292  ·  view source on GitHub ↗
(ty: &JitType, val: &AbiValue)

Source from the content-addressed store, hash-verified

283}
284
285fn type_check(ty: &JitType, val: &AbiValue) -> Result<(), JitArgumentError> {
286 match (ty, val) {
287 (JitType::Int, AbiValue::Int(_))
288 | (JitType::Float, AbiValue::Float(_))
289 | (JitType::Bool, AbiValue::Bool(_)) => Ok(()),
290 _ => Err(JitArgumentError::ArgumentTypeMismatch),
291 }
292}
293
294#[derive(Copy, Clone)]
295union UnTypedAbiValue {

Callers 2

invokeMethod · 0.70
setMethod · 0.70

Calls 1

ErrClass · 0.50

Tested by

no test coverage detected