mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
26 lines
507 B
D
26 lines
507 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail276.d(19): Error: `this` has no effect
|
|
fail_compilation/fail276.d(15): Error: cannot construct anonymous nested class because no implicit `this` reference to outer class is available
|
|
---
|
|
*/
|
|
|
|
class C
|
|
{
|
|
this()
|
|
{
|
|
auto i = new class()
|
|
{
|
|
auto k = new class()
|
|
{
|
|
void func()
|
|
{
|
|
this.outer.outer;
|
|
}
|
|
};
|
|
};
|
|
}
|
|
int i;
|
|
}
|
|
void main() {}
|