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

Consider (Never, u8) and enum A { Foo: (Never, u8) } -- should these coerce to any other type? Perhaps this should be a more general "is type uninhabited" test? #3496

Closed
mohammadfawaz opened this issue Dec 2, 2022 · 2 comments
Assignees
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen

Comments

@mohammadfawaz
Copy link
Contributor

    Consider `(Never, u8)` and `enum A { Foo: (Never, u8) }` -- should these coerce to any other type? Perhaps this should be a more general "is type uninhabited" test?

Originally posted by @Centril in #3362 (comment)

@mohammadfawaz mohammadfawaz added the compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen label Dec 2, 2022
@mohammadfawaz
Copy link
Contributor Author

Assigning to you @esdrubal. This is just a comment that may have not been addressed on your Never type PR.

@esdrubal
Copy link
Contributor

Closing this as our unification algorithm now coerces Never to any other type instead of empty enums, so it no longer makes sense considering coercing uninhabited types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
Projects
None yet
Development

No branches or pull requests

2 participants