Bug 16981 – [Reg 2.073] assigning class or struct pointers to enum became an error
Status
RESOLVED
Resolution
WONTFIX
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-12-18T18:11:00Z
Last change time
2017-01-17T23:35:29Z
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2016-12-18T18:11:38Z
cat > bug.d << CODE
void bug()
{
import std.regex : ctRegex;
enum te = ctRegex!("a");
}
CODE
dmd -c -o- bug
----
bug.d(4): Error: variable bug.bug.te : Unable to initialize enum with class or pointer to struct. Use static const variable instead.
----
Works without deprecation in 2.072.1.