gcc/testsuite/gdc.test/fail_compilation/fail17969.d
raw| 1 | /* TEST_OUTPUT: |
| 2 | --- |
| 3 | fail_compilation/fail17969.d(10): Error: no property `sum` for type `fail17969.__lambda_L10_C1!(int[]).__lambda_L10_C1.MapResult2!((b) => b)` |
| 4 | fail_compilation/fail17969.d(16): struct `MapResult2` defined here |
| 5 | --- |
| 6 | * https://issues.dlang.org/show_bug.cgi?id=17969 |
| 7 | */ |
| 8 | |
| 9 | |
| 10 | alias fun = a => MapResult2!(b => b).sum; |
| 11 | |
| 12 | int[] e; |
| 13 | static assert(!is(typeof(fun(e)) == void)); |
| 14 | void foo() { fun(e); } |
| 15 | |
| 16 | struct MapResult2(alias fun) |
| 17 | { |
| 18 | int[] _input; |
| 19 | } |