]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/test17959.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test17959.d
1 /* REQUIRED_ARGS: -preview=dip1000
2 TEST_OUTPUT:
3 ---
4 fail_compilation/test17959.d(18): Error: scope variable `this` assigned to non-scope `this.escape`
5 fail_compilation/test17959.d(19): Error: scope variable `this` assigned to non-scope `this.f`
6 ---
7 */
8
9 // https://issues.dlang.org/show_bug.cgi?id=17959
10
11 class Foo
12 {
13 void delegate () @safe escape;
14 Foo f;
15
16 void escfoo() @safe scope
17 {
18 this.escape = &this.escfoo;
19 f = this;
20 }
21 }