bottom type as parameter or local variable, does that make sense?

Max Samukha maxsamukha at gmail.com
Fri Jan 14 22:55:37 UTC 2022


On Friday, 14 January 2022 at 16:32:22 UTC, Paul Backus wrote:
> That's not what the bug is here. `noreturn` is the type of 
> expressions whose evaluation does not halt; i.e., it is a type 
> with no values. Therefore, declaring a variable of type 
> `noreturn` is a no-op: all it does is add a symbol to the 
> current scope. No initialization is performed, because there is 
> nothing to initialize.

Then, should "noreturn x = noreturn.init;" fail? In my world, it 
is equivalent to "noreturn x;". There is still an implicit 
initialization, which should halt.


More information about the Digitalmars-d mailing list