mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
13 lines
217 B
D
13 lines
217 B
D
// https://issues.dlang.org/show_bug.cgi?id=22635
|
|
// opCast prevent calling destructor for const this
|
|
|
|
struct Foo
|
|
{
|
|
bool opCast(T : bool)() const { assert(0); }
|
|
~this() {}
|
|
}
|
|
|
|
struct Bar
|
|
{
|
|
const Foo foo;
|
|
}
|