Odin
Odin copied to clipboard
'using _' with a pointer to struct as type in proc causes compiler assertion error
Having the 'using' keyword with _ is a struct pointer type causes the following assertion to trigger:
src/llvm_backend_expr.cpp(3191): Assertion Failure: `e->using_expr != nullptr` value
Minimal reproduction case:
A :: struct {
value: int,
}
call :: proc(using _: ^A) {
value = 10
}
main :: proc() {
a: A
call(&a)
}
naming the parameter will not trigger the assertion
// this is fine as expected
call :: proc(using x: ^A) {
value = 10
}
This issue is still present