I don't understand. I have to add const int x; at the beginning in order for this test to pass.
Then I get:
PS E:\DigitalMars\dmd2\samples> dmd -c bug.d
const(int)
false
bug.d(11): Error: declaration bug.main.x is already defined
const(int)
false
Comment #2 by timon.gehr — 2012-04-21T11:08:46Z
There is no 'main' in the test case in the bug report. The declarations reside at module scope.
To clarify: the issue is that the first two pragma(msg,...) print a wrong value.
Comment #3 by pro.mathias.lang — 2020-08-04T03:40:31Z
Fixed in v2.084:
```
2.063 to 2.083.1: Success with output:
-----
int
true
const(int)
false
-----
Since 2.084.1: Success with output:
-----
const(int)
false
const(int)
false
-----
```