Error message on connection when starting a flow source implementation with a data subcomponent #1987
AADL allows a flow source implementation to begin with a data subcomponent. However, the current OSATE implementation gives an error on the subsequent connection in the flow implementation when you try to do this.
Expected and Current Behavior
The expected behavior is that there should not be an error reported on the declarative model. In actuality there is an error of the form
Interestingly, there is no analogous error when ending a flow sink implementation at a data subcomponent.
Steps to Reproduce
Consider the example
OSATE will show an error marker on the connection identifier
Interestingly there is no similar error in the flow sink implementation
The error comes from
The text was updated successfully, but these errors were encountered:
I get source and destination errors in an end to flow destination in the following example:
Here I get errors on
After some time in the debugger, I have found that the flow sink case in
Of course the problem here is that we shouldn't be reporting an error in this case and we should be checking that
I feel better knowing it's trying to report an error because it didn't make sense that the flow source and flow sink cases would be handled differently.
The code for checking connections vs. subcomponents in flows is in method
(The source code for checking connection -> subcomponent) is similar around line 1567.)
But this doesn't work. The first part checks if
The other part is trying to deal the case of the connection being a parameter connection, but it has other problems. If I try to make an example that creates a flow from a subprogram, it doesn't work (which I think we already have an issue for):
Looking at flow source
If I change it to