Debian Codegraph @

gcc/testsuite/gdc.test/compilable/test22635.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=22635
2 // opCast prevent calling destructor for const this
3
4 struct Foo
5 {
6 bool opCast(T : bool)() const { assert(0); }
7 ~this() {}
8 }
9
10 struct Bar
11 {
12 const Foo foo;
13 }