RecordFlux icon indicating copy to clipboard operation
RecordFlux copied to clipboard

Detection of always `True` conditions

Open treiher opened this issue 3 years ago • 0 comments

package Test is

   type Protocol is (PROTO_X) with Size => 8;

   type M is
      message
         Protocol : Protocol;
         Data : Opaque
            with Size => 0;
      end message;

   type X is null message;

   for M use (Data => X)
      if Protocol = PROTO_X;

end Test;

It should be detected that Protocol = PROTO_X is always True, as Protocol has only one value.

treiher avatar May 11 '21 16:05 treiher