]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/test16037.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / test16037.d
1 /* REQUIRED_ARGS: -preview=dip1000
2 */
3
4 // https://issues.dlang.org/show_bug.cgi?id=16037
5
6 @safe:
7
8 void testXXX () @nogc
9 {
10 Object o;
11 scope bool delegate (Object) alwaysFalse = (Object y) { return false; };
12 scope c1 = o !is null ? (Object y) { return o is y; } : alwaysFalse;
13 }
14
15 auto f() @nogc
16 {
17 int a;
18 void g(){ a=1; }
19 scope h=&g;
20 h();
21 }
22
23