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

C structs pub inconsistency #22293

Open
Eliyaan opened this issue Sep 24, 2024 · 0 comments
Open

C structs pub inconsistency #22293

Eliyaan opened this issue Sep 24, 2024 · 0 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@Eliyaan
Copy link
Contributor

Eliyaan commented Sep 24, 2024

Describe the bug

I made a C wrapper module that I'm using in two projects (all the C structs are declared as private (no pub) in the wrapper):
In the first project I'm calling a function from the wrapper module that returns a C struct and I can access it's fields (a non pub struct with non pub fields) and no problem, it compiles properly.
In the second one I'm creating a struct that has a field of type of a C struct (non pub with non pub fields) and there V complains about the C struct being private.

So it is not normal that in the first project, it does not complain about the struct being private and used.

Reproduction Steps

See above for what I have done, (I'll try to give a MRE as soon as I get a bit more time).

Expected Behavior

That the first project complains about the struct being private.

Current Behavior

It only complains in the second project.

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.7 b8c649b.07465a4

Environment details (OS name and version, etc.)

V 0.4.7 b8c649b.07465a4

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@Eliyaan Eliyaan added the Bug This tag is applied to issues which reports bugs. label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

1 participant