Using a non-address-type variable in the sender redirect
A variable, of the type designated as the address type, is allowed in a sender redirect. Using such a variable currently causes a compilation error in the generated code.
With the recent changes to the address type, the type designated as address is no longer equivalent to the actual address type, since the address type can now be assigned the value 'null'. The address type now uses a separate type at runtime, and the 'receive' function expects an address type pointer for its sender redirect, not a pointer of the type designated as address.
For example, if 'integer' is the type designated as address,
type integer address;
then using an integer variable in the sender redirect causes a C++ compilation error.
var integer v_addr;
[] pt.receive(t_recv) -> sender v_addr { … }
Using an address variable would result in the generated code compiling successfully.
var address v_addr;
[] pt.receive(t_recv) -> sender v_addr { … }
Using the type designated as address (i.e. 'integer' in the example) in the sender redirect should still work correctly.
/cc @aknappqwt @mmagyari