forked from M-Labs/nac3
WIP8 - Expected Type
This commit is contained in:
parent
2a1d76213f
commit
6793563a7c
|
@ -24,7 +24,7 @@ use pyo3::{
|
|||
|
||||
use crate::{symbol_resolver::InnerResolver, timeline::TimeFns};
|
||||
|
||||
use inkwell::values::PointerValue;
|
||||
use inkwell::values::{PointerValue, StructValue};
|
||||
use itertools::Itertools;
|
||||
use nac3core::codegen::classes::{ListValue, NDArrayValue, RangeValue, UntypedArrayLikeAccessor};
|
||||
use nac3core::codegen::expr::destructure_range;
|
||||
|
@ -1096,7 +1096,7 @@ pub fn call_core_log_impl<'ctx>(
|
|||
pub fn call_rtio_log_impl<'ctx>(
|
||||
ctx: &mut CodeGenContext<'ctx, '_>,
|
||||
generator: &mut dyn CodeGenerator,
|
||||
channel: PointerValue<'ctx>,
|
||||
channel: StructValue<'ctx>,
|
||||
arg: (Type, BasicValueEnum<'ctx>),
|
||||
) -> Result<(), String> {
|
||||
let (arg_ty, arg_val) = arg;
|
||||
|
@ -1146,7 +1146,7 @@ pub fn gen_rtio_log<'ctx>(
|
|||
let channel_ty = fun.0.args[0].ty;
|
||||
assert!(ctx.unifier.unioned(channel_ty, ctx.primitives.str));
|
||||
let channel_arg =
|
||||
args[0].1.clone().to_basic_value_enum(ctx, generator, channel_ty)?.into_pointer_value();
|
||||
args[0].1.clone().to_basic_value_enum(ctx, generator, channel_ty)?.into_struct_value();
|
||||
let value_ty = fun.0.args[1].ty;
|
||||
let value_arg = args[1].1.clone().to_basic_value_enum(ctx, generator, value_ty)?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue