Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refinement of subtype with itself does not compile #593

Closed
senier opened this issue Mar 5, 2021 · 0 comments · Fixed by #594
Closed

Refinement of subtype with itself does not compile #593

senier opened this issue Mar 5, 2021 · 0 comments · Fixed by #594
Assignees
Labels
bug generator Related to generator package (SPARK code generation)

Comments

@senier
Copy link
Member

senier commented Mar 5, 2021

The following specification validates:

package Test is

   type Tag is (T1 => 1) with Size => 8;
   type Len is mod 2**8;

   type Packet is
      message
         Tag : Tag;
         Len : Len;
         Val : Opaque
            with Size => 8 * Len;
      end message;

   for Packet use (Val => Packet)                    
      if Tag = T1;

end Test;

The compilation fails:

rflx-test-generic_contains.ads:33:79: "Test_Packet_Context" conflicts with declaration at line 33
gprbuild: *** compilation phase failed
@senier senier created this issue from a note in RecordFlux 0.5 (To do) Mar 5, 2021
@senier senier added bug generator Related to generator package (SPARK code generation) labels Mar 5, 2021
@senier senier moved this from To do to Done in RecordFlux 0.5 Mar 6, 2021
@senier senier self-assigned this Mar 6, 2021
RecordFlux 0.5 automation moved this from Done to Merged Mar 8, 2021
@treiher treiher mentioned this issue Aug 4, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug generator Related to generator package (SPARK code generation)
Projects
No open projects
RecordFlux 0.5
  
Merged
Development

Successfully merging a pull request may close this issue.

1 participant