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

Name conflicts between literals and field names in SPARK code #329

Closed
treiher opened this issue Jul 8, 2020 · 0 comments · Fixed by #333
Closed

Name conflicts between literals and field names in SPARK code #329

treiher opened this issue Jul 8, 2020 · 0 comments · Fixed by #333
Assignees
Labels
bug generator Related to generator package (SPARK code generation)

Comments

@treiher
Copy link
Collaborator

treiher commented Jul 8, 2020

package Test is

     type A is (F_C => 0) with Size => 8;

     type B is
        message
           C : A;
        end message;

end Test;
rflx-test-generic_b.adb:45:15: error: missing case value: "F_C"
rflx-test-generic_b.adb:46:23: error: choice given in case expression is not static
rflx-test-generic_b.adb:46:28: error: expected type "Virtual_Field" defined at rflx-test-generic_b.ads:18
rflx-test-generic_b.adb:46:28: error: found type "U64" defined at rflx-rflx_arithmetic.ads:7
rflx-test-generic_b.adb:46:34: error: non-static function call (RM 4.9(6,18))
rflx-test-generic_b.adb:46:43: error: non-static function call (RM 4.9(6,18))
rflx-test-generic_b.adb:61:15: error: missing case value: "F_C"
rflx-test-generic_b.adb:62:23: error: choice given in case expression is not static
rflx-test-generic_b.adb:62:28: error: expected type "Virtual_Field" defined at rflx-test-generic_b.ads:18
rflx-test-generic_b.adb:62:28: error: found type "Bit_Length" defined at rflx-rflx_generic_types.ads:13, instance at rflx-test-generic_b.ads:5
rflx-test-generic_b.adb:62:28: error: static conversion requires static scalar subtype result (RM 4.9(9))
rflx-test-generic_b.adb:62:41: error: non-static function call (RM 4.9(6,18))
rflx-test-generic_b.adb:62:50: error: non-static function call (RM 4.9(6,18))
rflx-test-generic_b.adb:45:15: error: missing case value: "F_C"
rflx-test-generic_b.adb:46:23: error: choice given in case expression is not static
rflx-test-generic_b.adb:46:28: error: expected type "Virtual_Field" defined at rflx-test-generic_b.ads:18
rflx-test-generic_b.adb:46:28: error: found type "U64" defined at rflx-rflx_arithmetic.ads:7
rflx-test-generic_b.adb:46:34: error: non-static function call (RM 4.9(6,18))
rflx-test-generic_b.adb:46:43: error: non-static function call (RM 4.9(6,18))
rflx-test-generic_b.adb:61:15: error: missing case value: "F_C"
rflx-test-generic_b.adb:62:23: error: choice given in case expression is not static
rflx-test-generic_b.adb:62:28: error: expected type "Virtual_Field" defined at rflx-test-generic_b.ads:18
rflx-test-generic_b.adb:62:28: error: found type "Bit_Length" defined at rflx-rflx_generic_types.ads:13, instance at rflx-test-generic_b.ads:5
rflx-test-generic_b.adb:62:28: error: static conversion requires static scalar subtype result (RM 4.9(9))
rflx-test-generic_b.adb:62:41: error: non-static function call (RM 4.9(6,18))
rflx-test-generic_b.adb:62:50: error: non-static function call (RM 4.9(6,18))

   compilation of rflx-test-generic_b.adb failed
   compilation of rflx-test-b.ads failed
@treiher treiher added bug generator Related to generator package (SPARK code generation) labels Jul 8, 2020
@treiher treiher added this to To do in RecordFlux 0.4.1 via automation Jul 8, 2020
@treiher treiher moved this from To do to In progress in RecordFlux 0.4.1 Jul 9, 2020
@treiher treiher self-assigned this Jul 9, 2020
RecordFlux 0.4.1 automation moved this from In progress to Done Jul 9, 2020
@treiher treiher mentioned this issue Jul 14, 2020
4 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
Development

Successfully merging a pull request may close this issue.

1 participant