What is that "enum function" supposed to be ?
Paul Backus
snarwin at gmail.com
Mon Jul 19 21:31:40 UTC 2021
On Monday, 19 July 2021 at 21:16:57 UTC, Elmar wrote:
> I'd like to know:
> - What does return type `enum` mean?
It just means `auto`. Probably it shouldn't be allowed at all,
but D's parser is sometimes overly-permissive and will accept
things like this even when they don't really make sense.
For example, you can also declare a `@nogc` variable:
```d
@nogc x = new Object;
```
The `@nogc` attribute doesn't do anything here, but the compiler
allows it anyway.
More information about the Digitalmars-d
mailing list