Closed bocchino closed 1 year ago
Should we also be excluding the case where a typed output port with a return type is connected to a serial input port?
Yes, that sounds right. What happens in this case in the current implementation? Does the code even compile?
I think the expected behavior is to have an assertion fail on a nullptr, but currently it seg faults when FW_PORT_SERIALIZATION
is defined. Here is the code that's generated:
Maybe we should remove lines 110-112 for ports with return types.
Maybe we should remove lines 110-112 for ports with return types.
Yes, that sounds right. Also, we should systematically replace FW_ASSERT(ptr)
with FW_ASSERT(ptr != nullptr)
. C++ does not guarantee that nullptr == 0
.
OK, I revised the PR to exclude both serial -> typed and typed -> serial when the port type has a return type.
Closes #183.