| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/ice12841.d(23): Error: cannot take address of expression `taskPool().amap(Args...)(Args args)` because it is not an lvalue |
| 5 |
fail_compilation/ice12841.d(24): Error: cannot take address of template `amap(Args...)(Args args)`, perhaps instantiate it first |
| 6 |
--- |
| 7 |
*/ |
| 8 |
|
| 9 |
@property TaskPool taskPool() @trusted { return new TaskPool; } |
| 10 |
|
| 11 |
final class TaskPool |
| 12 |
{ |
| 13 |
template amap(functions...) |
| 14 |
{ |
| 15 |
auto amap(Args...)(Args args) |
| 16 |
{ |
| 17 |
} |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
void main() |
| 22 |
{ |
| 23 |
auto dg = &(taskPool.amap!"a.result()"); |
| 24 |
auto fp = &(TaskPool.amap!"a.result()"); |
| 25 |
} |