Fix derefs with casts

This commit is contained in:
Sofia 2025-07-28 01:36:35 +03:00
parent 57b5a5cce4
commit cea756b2ad
2 changed files with 8 additions and 1 deletions

View File

@ -7,6 +7,6 @@ edition = "2024"
[dependencies]
## LLVM Bindings
llvm-sys = {version ="201.0.1", features=["prefer-dynamic"] }
llvm-sys = {version ="201.0.1" }
## Make it easier to generate errors
thiserror = "1.0.44"

View File

@ -205,6 +205,13 @@ where
),
expr.0 .1,
),
ExpressionKind::CastTo(value_expr, ty) => Expression(
ExpressionKind::CastTo(
Box::new(apply_inner(PrimaryExpression(*value_expr.clone()), fun)),
ty.clone(),
),
expr.0 .1,
),
_ => fun(expr),
}
}