We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b28935c commit d81cf5aCopy full SHA for d81cf5a
src/bit_machine/mod.rs
@@ -239,16 +239,14 @@ impl BitMachine {
239
}
240
241
242
+ if self.read.is_empty() != self.source_ty.is_empty() {
243
+ return Err(ExecutionError::InputWrongType(self.source_ty.clone()));
244
+ }
245
+
246
let mut ip = program;
247
let mut call_stack = vec![];
248
let mut iterations = 0u64;
249
- let input_width = ip.arrow().source.bit_width();
- // TODO: convert into crate::Error
- assert!(
- self.read.is_empty() || input_width > 0,
250
- "Program requires a non-empty input to execute",
251
- );
252
let output_width = ip.arrow().target.bit_width();
253
if output_width > 0 {
254
self.new_frame(output_width);
0 commit comments