[Issue 19134] New: [C++] static const y = new Derived(); ->pointer cast from const(Derived) to immutable(void*)** is not supported at compile time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 2 01:34:30 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19134
Issue ID: 19134
Summary: [C++] static const y = new Derived(); ->pointer cast
from const(Derived) to immutable(void*)** is not
supported at compile time
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: iamthewilsonator at hotmail.com
https://forum.dlang.org/post/ghusgzuqpcskhwzmlwbh@forum.dlang.org
https://run.dlang.io/is/dSVruv
Works in DMD 2.080, regressed in DMD 2.081.
extern(C++) {
class Base {
this() {}
void consumeAVtblSlot() const {}
}
class Derived : Base {
this() {}
}
}
void main()
{
static const y = new Y();
}
fails with
Error: pointer cast from const(Y) to immutable(void*)** is not supported at
compile time
commenting out the constructor of X makes compilation succeed. Removing extern
C++ makes compilation succeed.
--
More information about the Digitalmars-d-bugs
mailing list