tests/dmd/runnable/imports/ice10086x.d
raw| 1 | module imports.ice10086x; |
| 2 | |
| 3 | import imports.ice10086y; |
| 4 | |
| 5 | struct S1 |
| 6 | { |
| 7 | int a1 = 123; |
| 8 | } |
| 9 | |
| 10 | @safe auto f1(S1 r) |
| 11 | { |
| 12 | return r; |
| 13 | } |
| 14 | |
| 15 | @safe auto f2a()(S1 r) |
| 16 | { |
| 17 | return bind!(f1, r); |
| 18 | } |
| 19 | |
| 20 | @safe auto f2b(S1 r) |
| 21 | { |
| 22 | return bind!(f1, r); |
| 23 | } |
| 24 | |
| 25 | void test() |
| 26 | { |
| 27 | S1 s1; |
| 28 | |
| 29 | auto za = bind!(f2a, s1)(); |
| 30 | assert(za.a1 == 123); |
| 31 | |
| 32 | auto zb = bind!(f2b, s1)(); |
| 33 | assert(zb.a1 == 123); |
| 34 | } |