Debian Codegraph @

gcc/testsuite/gdc.test/runnable/test23234.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=23234
2
3 class Bar
4 {
5 }
6
7 class Foo
8 {
9 Bar get() { return new Bar; }
10 alias get this;
11 }
12
13 void main()
14 {
15 auto foo = new Foo;
16 void test(Bar delegate() dg)
17 {
18 assert(dg() !is null);
19 }
20
21 test(() => foo);
22 }