Re: Enum AA with classes not allowed anymore?

2017-10-12 Thread bauss via Digitalmars-d
On Wednesday, 11 October 2017 at 17:40:15 UTC, Jonathan M Davis wrote: On Wednesday, October 11, 2017 17:05:19 Daniel Kozak via Digitalmars-d wrote: so you can try to use static immutable insted of enum Yeah. Similarly, you could just have a regular function that you call at compile time

Re: Enum AA with classes not allowed anymore?

2017-10-11 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, October 11, 2017 17:05:19 Daniel Kozak via Digitalmars-d wrote: > so you can try to use static immutable insted of enum Yeah. Similarly, you could just have a regular function that you call at compile time that returns what you want (assuming that it's not being assigned to an

Re: Enum AA with classes not allowed anymore?

2017-10-11 Thread Daniel Kozak via Digitalmars-d
so you can try to use static immutable insted of enum On Wed, Oct 11, 2017 at 5:04 PM, Daniel Kozak wrote: > Not sure, but I belive this could be one of reasons: > https://issues.dlang.org/show_bug.cgi?id=15989 > > On Wed, Oct 11, 2017 at 4:54 PM, bauss via Digitalmars-d < >

Re: Enum AA with classes not allowed anymore?

2017-10-11 Thread Daniel Kozak via Digitalmars-d
Not sure, but I belive this could be one of reasons: https://issues.dlang.org/show_bug.cgi?id=15989 On Wed, Oct 11, 2017 at 4:54 PM, bauss via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Sunday, 8 October 2017 at 04:40:59 UTC, Daniel Kozak wrote: > >> Up to 2.062 : Failure

Re: Enum AA with classes not allowed anymore?

2017-10-11 Thread bauss via Digitalmars-d
On Sunday, 8 October 2017 at 04:40:59 UTC, Daniel Kozak wrote: Up to 2.062 : Failure with output: - onlineapp.d(10): Error: cannot evaluate new Foo("0") at compile time onlineapp.d(10): Error: cannot evaluate new Foo("1") at compile time - 2.063 to 2.072.2: Success with

Re: Enum AA with classes not allowed anymore?

2017-10-07 Thread Daniel Kozak via Digitalmars-d
Up to 2.062 : Failure with output: - onlineapp.d(10): Error: cannot evaluate new Foo("0") at compile time onlineapp.d(10): Error: cannot evaluate new Foo("1") at compile time - 2.063 to 2.072.2: Success with output: Hello D Since 2.073.2: Failure with output: onlineapp.d(10):

Enum AA with classes not allowed anymore?

2017-10-07 Thread bauss via Digitalmars-d
I'm aware that the following has always been illegal: enum a = new Foo(); However the following were used to work in older versions of DMD: enum aa = [0 : new Foo("0"), 1 : new Foo("1")]; When did that change happen and what was the reason for the change? I were depending on AA's created