aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/fail276.d
blob: 4f9b7c34c0a266e95bba6e8317b2e5ae698df632 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
TEST_OUTPUT:
---
fail_compilation/fail276.d(19): Error: `this` has no effect
fail_compilation/fail276.d(15): Error: `this` is only defined in non-static member functions, not `__anonclass2`
---
*/

class C
{
    this()
    {
        auto i = new class()
        {
            auto k = new class()
            {
                void func()
                {
                    this.outer.outer;
                }
            };
        };
    }
    int i;
}
void main() {}