mirror of
https://github.com/edg-l/edlang.git
synced 2024-11-22 07:58:24 +00:00
fix
This commit is contained in:
parent
edb872a218
commit
a70924b81b
|
@ -992,15 +992,15 @@ fn compile_rvalue<'ctx>(
|
|||
for proj in &place.projection {
|
||||
match proj {
|
||||
ir::PlaceElem::Deref => {
|
||||
ptr = ctx
|
||||
.builder
|
||||
.build_load(compile_basic_type(ctx, &local_ty), ptr, "deref")?
|
||||
.into_pointer_value();
|
||||
local_ty = match local_ty.kind {
|
||||
ir::TypeKind::Ptr(_, inner) => *inner,
|
||||
ir::TypeKind::Ref(_, inner) => *inner,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
};
|
||||
ptr = ctx
|
||||
.builder
|
||||
.build_load(compile_basic_type(ctx, &local_ty), ptr, "deref")?
|
||||
.into_pointer_value();
|
||||
}
|
||||
ir::PlaceElem::Field { .. } => todo!(),
|
||||
ir::PlaceElem::Index { .. } => todo!(),
|
||||
|
|
Loading…
Reference in a new issue