For the data input IN of type BOOL in the OUT_BOOL function block, the following problems are seen :
Multiple connections are possible to the input IN from function blocks in the same device + funcion block in a diferent device.
If IN already has an input connection, it allows the back connecion of IN to a function block in a different device
This patch extend the data connection constraints applying the same conditions even when the connection is created from target to source. This solves the presented case and others types.
thanks for the patch. It is a good idea to do this there. However your patch will break CFB and subapp type editor as there the source can be an input (i.e., the FB input of the CFB/Subapplication).
You're right, it should be taken care of more inside the function. Looking into the code, I found that is possible to connect an Input of a Composite to the output of an internal FB, and vice versa, and I don't think that's possible.
In the new branch where the model is reworked I greatly improved the checks. Maybe you can take this work as a basis.
with 1.9.0 improvements this should be fixed.