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 dlang#1481 from 9rnsr/fix9305
Issue 9305 - Ugly Ddoc for default template lambda expressions
- Loading branch information
Showing
4 changed files
with
132 additions
and
4 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
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,38 @@ | ||
// PERMUTE_ARGS: | ||
// REQUIRED_ARGS: -D -Ddtest_results/compilable -o- | ||
// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9305 | ||
|
||
module ddoc9305; | ||
|
||
/** | ||
foo() | ||
*/ | ||
void foo(alias p = (a => a))() {} | ||
|
||
/* ret / prm / body */ | ||
/* _ / _ / expr */ template X(alias pred = x => x) {} /// | ||
/* _ / _ / stmt */ template X(alias pred = (x){ int y; return y; }) {} /// ditto | ||
/* _ / x / expr */ template X(alias pred = (int x) => x) {} /// ditto | ||
/* _ / x / stmt */ template X(alias pred = (int x){ int y; return y; }) {} /// ditto | ||
/* x / _ / expr */ | ||
/* x / _ / stmt */ | ||
/* x / x / expr */ | ||
/* x / x / stmt */ | ||
|
||
/* _ / _ / expr */ template X(alias pred = function (x) => x) {} /// | ||
/* _ / _ / stmt */ template X(alias pred = function (x){ return x + 1; }) {} /// ditto | ||
/* _ / x / expr */ template X(alias pred = function (int x) => x) {} /// ditto | ||
/* _ / x / stmt */ template X(alias pred = function (int x){ return x + 1; }) {} /// ditto | ||
/* x / _ / expr */ template X(alias pred = function int(x) => x) {} /// ditto | ||
/* x / _ / stmt */ template X(alias pred = function int(x){ return x + 1; }) {} /// ditto | ||
/* x / x / expr */ template X(alias pred = function int(int x) => x) {} /// ditto | ||
/* x / x / stmt */ template X(alias pred = function int(int x){ return x + 1; }) {} /// ditto | ||
|
||
/* _ / _ / expr */ template X(alias pred = delegate (x) => x) {} /// | ||
/* _ / _ / stmt */ template X(alias pred = delegate (x){ return x + 1; }) {} /// ditto | ||
/* _ / x / expr */ template X(alias pred = delegate (int x) => x) {} /// ditto | ||
/* _ / x / stmt */ template X(alias pred = delegate (int x){ return x + 1; }) {} /// ditto | ||
/* x / _ / expr */ template X(alias pred = delegate int(x) => x) {} /// ditto | ||
/* x / _ / stmt */ template X(alias pred = delegate int(x){ return x + 1; }) {} /// ditto | ||
/* x / x / expr */ template X(alias pred = delegate int(int x) => x) {} /// ditto | ||
/* x / x / stmt */ template X(alias pred = delegate int(int x){ return x + 1; }) {} /// ditto |
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,66 @@ | ||
<html><head> | ||
<META http-equiv="content-type" content="text/html; charset=utf-8"> | ||
<title>ddoc9305</title> | ||
</head><body> | ||
<h1>ddoc9305</h1> | ||
<br><br> | ||
<dl><dt><big><a name="foo"></a>void <u>foo</u>(alias p = (a) => a)(); | ||
</big></dt> | ||
<dd><u>foo</u>()<br><br> | ||
|
||
</dd> | ||
<dt><big><a name="X"></a>template <u>X</u>(alias pred = (x) => x)<br><a name="X"></a>template <u>X</u>(alias pred = (x) | ||
{ | ||
int y; | ||
return y; | ||
} | ||
)<br><a name="X"></a>template <u>X</u>(alias pred = (int x) => x)<br><a name="X"></a>template <u>X</u>(alias pred = (int x) | ||
{ | ||
int y; | ||
return y; | ||
} | ||
)</big></dt> | ||
<dd><br><br> | ||
</dd> | ||
<dt><big><a name="X"></a>template <u>X</u>(alias pred = function (x) => x)<br><a name="X"></a>template <u>X</u>(alias pred = function (x) | ||
{ | ||
return x + 1; | ||
} | ||
)<br><a name="X"></a>template <u>X</u>(alias pred = function (int x) => x)<br><a name="X"></a>template <u>X</u>(alias pred = function (int x) | ||
{ | ||
return x + 1; | ||
} | ||
)<br><a name="X"></a>template <u>X</u>(alias pred = function int(x) => x)<br><a name="X"></a>template <u>X</u>(alias pred = function int(x) | ||
{ | ||
return x + 1; | ||
} | ||
)<br><a name="X"></a>template <u>X</u>(alias pred = function int(int x) => x)<br><a name="X"></a>template <u>X</u>(alias pred = function int(int x) | ||
{ | ||
return x + 1; | ||
} | ||
)</big></dt> | ||
<dd><br><br> | ||
</dd> | ||
<dt><big><a name="X"></a>template <u>X</u>(alias pred = delegate (x) => x)<br><a name="X"></a>template <u>X</u>(alias pred = delegate (x) | ||
{ | ||
return x + 1; | ||
} | ||
)<br><a name="X"></a>template <u>X</u>(alias pred = delegate (int x) => x)<br><a name="X"></a>template <u>X</u>(alias pred = delegate (int x) | ||
{ | ||
return x + 1; | ||
} | ||
)<br><a name="X"></a>template <u>X</u>(alias pred = delegate int(x) => x)<br><a name="X"></a>template <u>X</u>(alias pred = delegate int(x) | ||
{ | ||
return x + 1; | ||
} | ||
)<br><a name="X"></a>template <u>X</u>(alias pred = delegate int(int x) => x)<br><a name="X"></a>template <u>X</u>(alias pred = delegate int(int x) | ||
{ | ||
return x + 1; | ||
} | ||
)</big></dt> | ||
<dd><br><br> | ||
</dd> | ||
</dl> | ||
|
||
<hr><small>Page generated by <a href="http://dlang.org/ddoc.html">Ddoc</a>. </small> | ||
</body></html> |