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

Function compatible_kind

crates/vm/src/builtins/frame.rs:102–113  ·  view source on GitHub ↗
(from: i64, to: i64)

Source from the content-addressed store, hash-verified

100 }
101
102 fn compatible_kind(from: i64, to: i64) -> bool {
103 if to == 0 {
104 return false;
105 }
106 if to == Kind::Object as i64 {
107 return from != Kind::Null as i64;
108 }
109 if to == Kind::Null as i64 {
110 return true;
111 }
112 from == to
113 }
114
115 pub fn compatible_stack(from_stack: i64, to_stack: i64) -> bool {
116 if from_stack < 0 || to_stack < 0 {

Callers 1

compatible_stackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected