aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/ddoc10236b.d
blob: 065ced0936c0ae91cfa3d0494dfe189ecdd2e5ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -wi -o-

/*
TEST_OUTPUT:
---
compilable/ddoc10236b.d(43): Warning: Ddoc: parameter count mismatch
compilable/ddoc10236b.d(55): Warning: Ddoc: function declaration has no parameter 'y'
compilable/ddoc10236b.d(67): Warning: Ddoc: function declaration has no parameter 'y'
compilable/ddoc10236b.d(67): Warning: Ddoc: parameter count mismatch
---
*/

/***********************************
 * foo_good does this.
 * Params:
 *	x =	is for this
 *		and not for that
 *	y =	is for that
 */

void foo_good(int x)(int y)
{
}

/***********************************
 * foo_good2 does this.
 * Params:
 *	y =	is for that
 */

void foo_good2(int x)(int y)
{
}

/***********************************
 * foo_count_mismatch does this.
 * Params:
 *	x =	is for this
 *		and not for that
 */

void foo_count_mismatch(int x)(int y)	// Warning: Ddoc: parameter count mismatch
{
}

/***********************************
 * foo_no_param_y does this.
 * Params:
 *	x =	is for this
 *		and not for that
 *	y =	is for that
 */

void foo_no_param_y(int x)(int z)		// Warning: Ddoc: function declaration has no parameter 'y'
{
}

/***********************************
 * foo_count_mismatch_no_param_y does this.
 * Params:
 *	x =	is for this
 *		and not for that
 *	y =	is for that
 */

void foo_count_mismatch_no_param_y(int x)()
{
}