bottom type as parameter or local variable, does that make sense?
vit at vit.vit
Fri Jan 14 14:05:25 UTC 2022
On Friday, 14 January 2022 at 13:58:38 UTC, H. S. Teoh wrote:
> On Fri, Jan 14, 2022 at 11:52:04AM +0000, WebFreak001 via
> Digitalmars-d wrote:
>> void bar()
>> noreturn b;
> Wait, doesn't the DIP say that while declaring a variable of
> type `noreturn` is technically allowed, it should abort at
> runtime as soon as the variable is initialized? Why is program
> actually running past that line??!
Whith explicit init it works like that:
noreturn n = noreturn.init;
//Illegal instruction (core dumped)
More information about the Digitalmars-d