mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 03:42:17 +00:00
add NullPointer to mono::ir::Expr
This commit is contained in:
parent
63cdd00d13
commit
09779f65ad
9 changed files with 28 additions and 3 deletions
|
@ -1082,6 +1082,12 @@ pub fn build_exp_expr<'a, 'ctx, 'env>(
|
|||
|
||||
match expr {
|
||||
Literal(literal) => build_exp_literal(env, layout_interner, parent, layout, literal),
|
||||
NullPointer => {
|
||||
let basic_type = basic_type_from_layout(env, layout_interner, layout);
|
||||
|
||||
debug_assert!(basic_type.is_pointer_type());
|
||||
basic_type.into_pointer_type().const_zero().into()
|
||||
}
|
||||
|
||||
Call(call) => build_exp_call(
|
||||
env,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue