summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/fail23181.d
blob: 519244c1cdfab2449efc66accbdad08f6b37cb55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* https://issues.dlang.org/show_bug.cgi?id=23181
TEST_OUTPUT:
---
$p:druntime/import/core/lifetime.d$($n$): Error: struct `fail23181.fail23181.NoPostblit` is not copyable because it has a disabled postblit
$p:druntime/import/core/internal/array/construction.d$($n$): Error: template instance `core.lifetime.copyEmplace!(NoPostblit, NoPostblit)` error instantiating
fail_compilation/fail23181.d(15):        instantiated from here: `_d_arraysetctor!(NoPostblit[], NoPostblit)`
---
*/
void fail23181()
{
    struct NoPostblit
    {
        @disable this(this);
    }
    NoPostblit[4] noblit23181 = NoPostblit();
}