RecordFlux
RecordFlux copied to clipboard
Ensure existence of message fields in checksum specification
The parameters of a checksum specification should be verified. A checksum specification referring to non-existing message fields should be rejected.
Example
The following specification should be rejected, as Foo
, Bar
and Baz
are not defined:
package Test is
type Message is
message
Checksum : Opaque
with Size => 8
if Checksum'Valid_Checksum;
end message with
Checksum => (Checksum => (Foo'First .. Bar'Last, Baz));
end Test;
We do detect that Baz
is undefined now:
Parsing test.rflx
Processing Test
test.rflx:9:59: model: error: unknown field "Baz" referenced in definition of checksum "Checksum"
However, Foo
and Bar
are still not detected.