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 support for never type #1214

Open
heshanpadmasiri opened this issue Jul 3, 2023 · 0 comments
Open

Add support for never type #1214

heshanpadmasiri opened this issue Jul 3, 2023 · 0 comments
Labels
extends language Extends the language accepted by the compiler Type/NewFeature

Comments

@heshanpadmasiri
Copy link
Member

heshanpadmasiri commented Jul 3, 2023

Currently we don't support never type in the front end (ref). Once we do, we need to

  • support functions whose return type is never
  • check that expressions of type never only occur in places where the language allows them
  • check that types equivalent to never only occur where the language allows them
  • update reachability handling to deal with non-returning functions

Function's return type is the return type, if it returns normally. When we say function returns never it means function never returns normally, ie. it always either does not return or panics (example).

@jclark jclark changed the title Add support for functions that don't return Add support for never type Jul 14, 2023
@jclark jclark added the extends language Extends the language accepted by the compiler label Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extends language Extends the language accepted by the compiler Type/NewFeature
Projects
None yet
Development

No branches or pull requests

2 participants