Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3616 from 9rnsr/fix12841
Issue 12841 - ICE on taking function address
- Loading branch information
Showing
2 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/ice12841.d(23): Error: taskPool().amap!"a.result()" is not an lvalue | ||
fail_compilation/ice12841.d(24): Error: amap!"a.result()" is not an lvalue | ||
--- | ||
*/ | ||
|
||
@property TaskPool taskPool() @trusted { return new TaskPool; } | ||
|
||
final class TaskPool | ||
{ | ||
template amap(functions...) | ||
{ | ||
auto amap(Args...)(Args args) | ||
{ | ||
} | ||
} | ||
} | ||
|
||
void main() | ||
{ | ||
auto dg = &(taskPool.amap!"a.result()"); | ||
auto fp = &(TaskPool.amap!"a.result()"); | ||
} |