Fix deref expecting a codegenptr and not borrow

This commit is contained in:
Sofia 2025-07-24 01:51:44 +03:00
parent 87a8eac61b
commit 6664b25932
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
fn main() {
fn main() -> u8 {
let mut a = 5;
inner(&mut a);
return 0;
}
fn inner(a: &mut i32) {

View File

@ -1179,7 +1179,7 @@ impl mir::Expression {
Some({
if state.should_load {
if let TypeKind::CodegenPtr(inner) = *ptr_inner.clone() {
if let TypeKind::Borrow(inner, _) = *ptr_inner.clone() {
StackValue(
v.0.derive(
scope