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

API docs for NoReturn and Void are missing #13272

Open
straight-shoota opened this issue Apr 4, 2023 · 2 comments
Open

API docs for NoReturn and Void are missing #13272

straight-shoota opened this issue Apr 4, 2023 · 2 comments

Comments

@straight-shoota
Copy link
Member

straight-shoota commented Apr 4, 2023

The stdlib API documentation has no entry for NoReturn and Void.
They are special types defined by the compiler, but we usually document those in the API docs as well for completeness.
The language specification has a section about it: https://crystal-lang.org/reference/1.7/syntax_and_semantics/return_types.html

There's a significant roadblock: NoReturn and Void are special kinds of types and cannot be reopened in code which would be necessary to attach a doc comment. So we'll probably need to implement some kind of workaround in the doc generator to make it possible. Maybe something similar to #8327.

Edit: Added Void (originally, it was only about NoReturn).

@devnote-dev
Copy link
Contributor

This should also include Void which is mentioned in the C Bindings section next to NoReturn.

@HertzDevil
Copy link
Contributor

HertzDevil commented Apr 4, 2023

#8422 is also a possible solution for NoReturn (you could define class methods on NoReturn just fine so there is a use case for that).

@straight-shoota straight-shoota changed the title API docs for NoReturn are missing API docs for NoReturn and Void are missing Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants