Force inout port

In reply to robert.liu:

bar is a net according to section 23.2.2.3 Rules for determining port kind, data type, and direction. The implicit kind for a an input or inout port is a net. Two simulators on EDAplayground agree with this interpretation.

You are correct about the distinction between port name and the object it is connected to. Usually they have the same name, but there is syntax to separate them.