Enums with Inline Subclass
Suleyman
sahmi.soulaimane at gmail.com
Thu Nov 14 18:41:32 UTC 2019
On Wednesday, 13 November 2019 at 20:46:25 UTC, mark_mcs wrote:
> [...]
> My question is: should this be possible? Is this a grammar bug
> or a codegen bug?
You should open an issue at https://issues.dlang.org/.
This works:
```
class I {}
static I obj;
static this()
{
obj = new class I {};
}
void main() {}
```
But this doesn't:
```
class I {}
static immutable I obj = cast(immutable) new class I {};
void main() {}
```
More information about the Digitalmars-d
mailing list