Bug 12016 – implicit immutable upcast becomes null in CTFE
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-27T22:33:00Z
Last change time
2014-02-01T04:50:42Z
Keywords
CTFE, pull
Assigned to
nobody
Creator
dlang-bugzilla
Comments
Comment #0 by dlang-bugzilla — 2014-01-27T22:33:46Z
/////////////////////////////////
class Base { }
class Sub : Base { }
int f(immutable Base c)
{
assert(c);
return 1;
}
enum i = f(new immutable Sub);
/////////////////////////////////
The assert fails in DMD git but not 2.064.2.
Comment #1 by dlang-bugzilla — 2014-01-27T22:57:08Z