[rlox] Error when add operands are of wrong types

This commit is contained in:
ctsk
2023-10-21 12:16:17 +02:00
parent 1d0fde3594
commit 94fe68aedc

View File

@@ -117,7 +117,7 @@ impl VM {
}
}?
}
_ => todo!()
_ => return Err(VMError::Runtime("Operands of + need to be numbers or strings".into(), self.pc))
};
}
Op::Subtract | Op::Multiply | Op::Divide => {