mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
22 lines
336 B
D
22 lines
336 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/diag7050c.d(14): Error: `@safe` destructor `diag7050c.B.~this` cannot call `@system` destructor `diag7050c.A.~this`
|
|
fail_compilation/diag7050c.d(11): `diag7050c.A.~this` is declared here
|
|
---
|
|
*/
|
|
|
|
struct A
|
|
{
|
|
~this(){}
|
|
}
|
|
|
|
@safe struct B
|
|
{
|
|
A a;
|
|
}
|
|
|
|
@safe void f()
|
|
{
|
|
auto x = B.init;
|
|
}
|