Fix the results of binds problem.
This commit is contained in:
@@ -129,14 +129,13 @@ proptest::proptest! {
|
|||||||
let basic_result = basic_result.map(|x| x.replace('\n', "\r\n"));
|
let basic_result = basic_result.map(|x| x.replace('\n', "\r\n"));
|
||||||
|
|
||||||
if !matches!(basic_result, Err(EvalError::PrimOp(PrimOpError::MathFailure(_)))) {
|
if !matches!(basic_result, Err(EvalError::PrimOp(PrimOpError::MathFailure(_)))) {
|
||||||
// use pretty::{DocAllocator, Pretty};
|
//use pretty::DocAllocator;
|
||||||
// let allocator = pretty::BoxAllocator;
|
//let allocator = pretty::Arena::new();
|
||||||
// allocator
|
//let result = allocator.text("-------------")
|
||||||
// .text("---------------")
|
// .append(allocator.line())
|
||||||
// .append(allocator.hardline())
|
|
||||||
// .append(program.pretty(&allocator))
|
// .append(program.pretty(&allocator))
|
||||||
// .1
|
// .append(allocator.line());
|
||||||
// .render_colored(70, pretty::termcolor::StandardStream::stdout(pretty::termcolor::ColorChoice::Auto))
|
//result.render_raw(70, &mut pretty::IoWrite::new(std::io::stdout()))
|
||||||
// .expect("rendering works");
|
// .expect("rendering works");
|
||||||
|
|
||||||
let compiled_result = Backend::<ObjectModule>::eval(program);
|
let compiled_result = Backend::<ObjectModule>::eval(program);
|
||||||
|
|||||||
@@ -363,6 +363,10 @@ impl<M: Module> Backend<M> {
|
|||||||
|
|
||||||
(types::I64, Type::Primitive(PrimitiveType::U64)) => Ok((val, val_type)),
|
(types::I64, Type::Primitive(PrimitiveType::U64)) => Ok((val, val_type)),
|
||||||
|
|
||||||
|
(types::I64, Type::Primitive(PrimitiveType::Void)) => {
|
||||||
|
Ok((builder.ins().iconst(types::I64, 0), VOID_REPR_TYPE))
|
||||||
|
}
|
||||||
|
|
||||||
_ => Err(BackendError::InvalidTypeCast {
|
_ => Err(BackendError::InvalidTypeCast {
|
||||||
from: val_type,
|
from: val_type,
|
||||||
to: target_type,
|
to: target_type,
|
||||||
|
|||||||
Reference in New Issue
Block a user