Tested with DMD 2.054 on Win32. Didn't happen in DMD 2.053. enum : string { //OK A = "A", } enum Enum : string { B = "B", //Error: Integer constant expression expected instead of "B". } void main() {}
This is cv4_Denum function problem in tocvdebug.c. It calls enum member's toInteger(). And, in local, same error occurs with 'dmd-2.053' tag. Maybe this is not 2.054 regression.
There is already a simple patch in report 5985, but maybe a pull request is needed nowadays. *** This issue has been marked as a duplicate of issue 5985 ***