You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new type that has no instances and is a subtype of every other type can be introduced, called never or bottom. It will be the official return type of the throw expression and will allow transforming return, break, continue and goto into expressions (see #176). This will allow them in all expression contexts where never is combined with another type (&&, ||, ??, ?:) or discarded (expression statements). Instantiating variables/fields of type never should be impossible.
It can either be implemented as a real CLR type (well, as real as void) or as a compiler trick (never-returning methods are actually void with a NeverReturnsAttribute).
Design meetings
The text was updated successfully, but these errors were encountered:
never
/bottom
typeSummary
A new type that has no instances and is a subtype of every other type can be introduced, called
never
orbottom
. It will be the official return type of thethrow
expression and will allow transformingreturn
,break
,continue
andgoto
into expressions (see #176). This will allow them in all expression contexts wherenever
is combined with another type (&&
,||
,??
,?:
) or discarded (expression statements). Instantiating variables/fields of typenever
should be impossible.It can either be implemented as a real CLR type (well, as real as
void
) or as a compiler trick (never
-returning methods are actuallyvoid
with aNeverReturnsAttribute
).Design meetings
The text was updated successfully, but these errors were encountered: