RecordFlux icon indicating copy to clipboard operation
RecordFlux copied to clipboard

Ensure existence of message fields in checksum specification

Open treiher opened this issue 3 years ago • 1 comments

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;

treiher avatar Aug 03 '21 10:08 treiher

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.

senier avatar Aug 24 '22 12:08 senier