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

Add rule regarding use of Void outside C lib bindings #598

Open
nobodywasishere opened this issue Mar 18, 2025 · 1 comment · May be fixed by #602
Open

Add rule regarding use of Void outside C lib bindings #598

nobodywasishere opened this issue Mar 18, 2025 · 1 comment · May be fixed by #602
Labels

Comments

@nobodywasishere
Copy link
Contributor

crystal-lang/crystal#10657

getter qux : Void?
           # ^^^^ error: `Void` should only be used in the context of C bindings

def foo(bar : Void) : Void
            # ^^^^ error: `Void` should only be used in the context of C bindings
                    # ^^^^ error: `Void` should only be used in the context of C bindings
  baz = uninitialized Void
                    # ^^^^ error: `Void` should only be used in the context of C bindings
end
@Sija
Copy link
Member

Sija commented Mar 18, 2025

I like the idea, just mind you that usages of Pointer(Void) should still be allowed.

@Sija Sija added the rule label Mar 18, 2025
@nobodywasishere nobodywasishere linked a pull request Mar 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants