On Saturday, 8 July 2017 at 12:17:57 UTC, Andrei Alexandrescu wrote:
    @disable @property None init();

You meant static here I guess.

The compiler detects (without having anything hardwired about the particular type "None") that the type None is impossible to create and copy/move from a function, and therefore decrees the function will never return.

Cheat: https://is.gd/pf25nP

Works because of NRVO I guess. This particular one is countered by also adding a disabled destructor.

Reply via email to