]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/compilable/ddoc9305.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / ddoc9305.d
CommitLineData
b4c522fa
IB
1// PERMUTE_ARGS:
2// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
5fee5ec3 3// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
b4c522fa
IB
4
5module ddoc9305;
6
7/**
8foo()
9*/
10void foo(alias p = (a => a))() {}
11
12/* ret / prm / body */
13/* _ / _ / expr */ template X(alias pred = x => x) {} ///
14/* _ / _ / stmt */ template X(alias pred = (x){ int y; return y; }) {} /// ditto
15/* _ / x / expr */ template X(alias pred = (int x) => x) {} /// ditto
16/* _ / x / stmt */ template X(alias pred = (int x){ int y; return y; }) {} /// ditto
17/* x / _ / expr */
18/* x / _ / stmt */
19/* x / x / expr */
20/* x / x / stmt */
21
22/* _ / _ / expr */ template X(alias pred = function (x) => x) {} ///
23/* _ / _ / stmt */ template X(alias pred = function (x){ return x + 1; }) {} /// ditto
24/* _ / x / expr */ template X(alias pred = function (int x) => x) {} /// ditto
25/* _ / x / stmt */ template X(alias pred = function (int x){ return x + 1; }) {} /// ditto
26/* x / _ / expr */ template X(alias pred = function int(x) => x) {} /// ditto
27/* x / _ / stmt */ template X(alias pred = function int(x){ return x + 1; }) {} /// ditto
28/* x / x / expr */ template X(alias pred = function int(int x) => x) {} /// ditto
29/* x / x / stmt */ template X(alias pred = function int(int x){ return x + 1; }) {} /// ditto
30
31/* _ / _ / expr */ template X(alias pred = delegate (x) => x) {} ///
32/* _ / _ / stmt */ template X(alias pred = delegate (x){ return x + 1; }) {} /// ditto
33/* _ / x / expr */ template X(alias pred = delegate (int x) => x) {} /// ditto
34/* _ / x / stmt */ template X(alias pred = delegate (int x){ return x + 1; }) {} /// ditto
35/* x / _ / expr */ template X(alias pred = delegate int(x) => x) {} /// ditto
36/* x / _ / stmt */ template X(alias pred = delegate int(x){ return x + 1; }) {} /// ditto
37/* x / x / expr */ template X(alias pred = delegate int(int x) => x) {} /// ditto
38/* x / x / stmt */ template X(alias pred = delegate int(int x){ return x + 1; }) {} /// ditto