You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OSATE will accept the following declarations. It would seem that either an error would be raised on the first property association that constant is only allowed in property sets; or else an error would be raised in the second that overriding a property earlier declared to be constant is not allowed. (It would actually be nice to do this in some cases. Perhaps the committee might let such a request slip through into AADL 2.3 as an errata.)
system Desired_Component
properties
Memory_Size => constant 5 MByte;
end Desired_Component;
system implementation Desired_Component.Provided_Implementation
properties
Memory_Size => 10 Mbyte;
end Desired_Component.Provided_Implementation;
The text was updated successfully, but these errors were encountered:
According to the standard Memory_Size cannot be overwritten in the implementation because it is marked constant in the type. I assume that the same would apply for type extension.
If a contained property association is marked constant it means that there cannot be another contained property association higher up in the containment hierarchy that overrides the property value.
We need to add a validation that finds errors when overriding a constant property value that is inherited.
Instantiation needs to check if a contained property association overrides a constant property value. This tracked in a separate issue (#1447).
OSATE will accept the following declarations. It would seem that either an error would be raised on the first property association that constant is only allowed in property sets; or else an error would be raised in the second that overriding a property earlier declared to be constant is not allowed. (It would actually be nice to do this in some cases. Perhaps the committee might let such a request slip through into AADL 2.3 as an errata.)
The text was updated successfully, but these errors were encountered: