diff --git a/src/compiler.pr b/src/compiler.pr index 11bc686..a3e139c 100644 --- a/src/compiler.pr +++ b/src/compiler.pr @@ -4293,9 +4293,9 @@ def walk_AlignOf(node: &parser::Node, state: &State) -> Value { return value } -def convert_ref_to_int(value: Value, loc: &Value, state: &State) -> Value { - let gep_ret = convert_ref_to_ptr(pointer(value.tpe.tpe if value.tpe.tpe else builtins::int8_), value, loc, state) - return state.ptr_to_int(gep_ret, loc) +def convert_ref_to_int(node: &parser::Node, value: Value, loc: &Value, state: &State) -> Value { + let ptr = convert_ref_to_ptr(pointer(value.tpe.tpe if value.tpe.tpe else builtins::int8_), value, loc, state) + return state.ptr_to_int(ptr, loc) } def compare(node: &parser::Node, left: Value, right: Value, state: &State) -> Value {