aboutsummaryrefslogtreecommitdiff
path: root/libphobos/testsuite/libphobos.exceptions/invalid_memory_operation.d
blob: 7763f0a52d80a86a9236506a8d441f14f0ce7081 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-shouldfail "Invalid memory operation" }
// { dg-output "core.exception.InvalidMemoryOperationError@.*: Invalid memory operation" }
struct S
{
    ~this()
    {
        new int;
    }
}

void main()
{
    foreach(i; 0 .. 100)
        new S;
}