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

Implement 'Never' type (!) #420

Merged
merged 1 commit into from
Apr 29, 2024
Merged

Implement 'Never' type (!) #420

merged 1 commit into from
Apr 29, 2024

Conversation

sharkdp
Copy link
Owner

@sharkdp sharkdp commented Apr 29, 2024

This allow us to use error(…) in almost all contexts. In particular, it makes the following code compile for all X:

if <some precondition>
  then X
  else error("please make sure <some precondition> is met")

@Bzero This one is for you 😄

@sharkdp sharkdp merged commit 392a8d7 into master Apr 29, 2024
15 checks passed
@sharkdp sharkdp deleted the add-never-type branch April 29, 2024 20:00
@Bzero
Copy link
Contributor

Bzero commented Apr 29, 2024

Thanks @sharkdp 😄!

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.

2 participants