Unification of Never Type #6391
Labels
audit-report
Related to the audit report
bug
Something isn't working
P: low
team:compiler
Compiler Team
CS-FSSA-025
Some operators like return are assigned to a Never type also denoted with !. This represents
expressions whose evaluation cannot be assigned if they're on the right-hand-side. When never is
unifified with another type, then the other type should dominate. Consider the following example:
In the example, the type of v is u32 from (1) and is also assigned a ! from (2). Since ! is always
unified with any type the snippet successfully type checks. However, the following does not type check,
even though it's a similar case.
The text was updated successfully, but these errors were encountered: