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

Issue 752: Fix generation for functions with builtin types #754

Merged
merged 2 commits into from
Sep 7, 2021

Conversation

kanigsson
Copy link
Collaborator

Ref. #752

@kanigsson kanigsson requested a review from treiher August 26, 2021 07:41
@kanigsson
Copy link
Collaborator Author

One issue that I saw locally is that the test I filed fails with a compilation/style warning:

rflx-empty_ident-session.ads:60:04: warning: use clause for type "Index" defined at rflx-rflx_generic_types.ads:25, instance at rflx-rflx_types.ads:14 has no effect [-gnatwu]

I don't really know how to fix it, and it isn't really relevant to the commit. Probably best to change the test case.

@kanigsson kanigsson force-pushed the issue_752 branch 2 times, most recently from e90b363 to 73b2236 Compare August 26, 2021 08:13
@kanigsson
Copy link
Collaborator Author

The coverage issue (present in an earlier version) looks similar to the issue we discussed yesterday, and I added a similar fix. Do you agree?

@senier senier linked an issue Aug 26, 2021 that may be closed by this pull request
@treiher treiher changed the title Fix generation for functions with builtin types Issue 752: Fix generation for functions with builtin types Aug 30, 2021
@treiher
Copy link
Collaborator

treiher commented Aug 30, 2021

One issue that I saw locally is that the test I filed fails with a compilation/style warning:

rflx-empty_ident-session.ads:60:04: warning: use clause for type "Index" defined at rflx-rflx_generic_types.ads:25, instance at rflx-rflx_types.ads:14 has no effect [-gnatwu]

I don't really know how to fix it, and it isn't really relevant to the commit. Probably best to change the test case.

This is a bug in the code generator. The generated code must not lead to a warning in the compiler. The issue will be fixed by #757.

tests/integration/specification_model_generator_test.py Outdated Show resolved Hide resolved
rflx/generator/session.py Outdated Show resolved Hide resolved
@kanigsson
Copy link
Collaborator Author

I took a simpler approach with this fix. I also didn't add a test because there are other issues to be fixed with that test code.

@kanigsson kanigsson merged commit 870744f into main Sep 7, 2021
@kanigsson kanigsson deleted the issue_752 branch September 7, 2021 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

builtin type as return type of function
2 participants