[Issue 18945] immutable variable is used as if it's an enum

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 Iain Buclaw changed: What|Removed |Added Priority|P1 |P3 --

[Issue 18945] immutable variable is used as if it's an enum

2018-06-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 --- Comment #11 from David Bennett --- (In reply to Simen Kjaeraas from comment #10) > (In reply to David Bennett from comment #9) > > https://run.dlang.io/is/zZWdIQ > > > > Only works currently with static immutable > > What do you mean? It works

[Issue 18945] immutable variable is used as if it's an enum

2018-06-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 --- Comment #10 from Simen Kjaeraas --- (In reply to David Bennett from comment #9) > https://run.dlang.io/is/zZWdIQ > > Only works currently with static immutable What do you mean? It works perfectly with enum: https://run.dlang.io/is/3Xy5pI --

[Issue 18945] immutable variable is used as if it's an enum

2018-06-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 ag0aep6g changed: What|Removed |Added CC||ag0ae...@gmail.com --

[Issue 18945] immutable variable is used as if it's an enum

2018-06-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 --- Comment #9 from David Bennett --- (In reply to David Bennett from comment #8) > (In reply to David Bennett from comment #7) > > Then there are immutable struct members used at compile time, they might not > > be easy to convert to an enum. > >

[Issue 18945] immutable variable is used as if it's an enum

2018-06-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 --- Comment #8 from David Bennett --- (In reply to David Bennett from comment #7) > Then there are immutable struct members used at compile time, they might not > be easy to convert to an enum. > https://run.dlang.io/is/cfGfxw > I've never seen it

[Issue 18945] immutable variable is used as if it's an enum

2018-06-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 --- Comment #7 from David Bennett --- (In reply to Jonathan M Davis from comment #6) > > Just use an enum if you want the value to be known and used at compile time, > and use an immutable variable if you want it to be known and used at > runtime.

[Issue 18945] immutable variable is used as if it's an enum

2018-06-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 --- Comment #6 from Jonathan M Davis --- (In reply to David Bennett from comment #4) > I'm not sure what workaround we would recommend in the deprecation messaged > as the current functionality is actually hard to replicate. Just use an enum if you

[Issue 18945] immutable variable is used as if it's an enum

2018-06-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 anonymous4 changed: What|Removed |Added Hardware|x86 |All OS|Windows

[Issue 18945] immutable variable is used as if it's an enum

2018-06-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 David Bennett changed: What|Removed |Added CC||davidbenn...@bravevision.co

[Issue 18945] immutable variable is used as if it's an enum

2018-06-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 --- Comment #3 from Jonathan M Davis --- This probably does need to be removed via deprecation rather than simply making it an error, but allowing it is exactly the sort of thing that increases the confusion about how CTFE works and when it's used.

[Issue 18945] immutable variable is used as if it's an enum

2018-06-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 --- Comment #2 from David Bennett --- Disclaimer: Just a D user, I hold no decision making power or insight into the history here. const and immutable are runtime lvalues that have a known way to get "a" value at compiletime. As you have noticed

[Issue 18945] immutable variable is used as if it's an enum

2018-06-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18945 Jonathan M Davis changed: What|Removed |Added CC||issues.dl...@jmdavisprog.co