| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/bug15613.d(18): Error: function `f` is not callable using argument types `(typeof(null))` |
| 5 |
fail_compilation/bug15613.d(18): cannot pass argument `null` of type `typeof(null)` to parameter `int...` |
| 6 |
fail_compilation/bug15613.d(13): `bug15613.f(int...)` declared here |
| 7 |
fail_compilation/bug15613.d(19): Error: function `g` is not callable using argument types `(int)` |
| 8 |
fail_compilation/bug15613.d(19): cannot pass argument `8` of type `int` to parameter `Object` |
| 9 |
fail_compilation/bug15613.d(14): `bug15613.g(Object, ...)` declared here |
| 10 |
--- |
| 11 |
*/ |
| 12 |
|
| 13 |
void f(int...); |
| 14 |
void g(Object, ...); |
| 15 |
|
| 16 |
void main() |
| 17 |
{ |
| 18 |
f(null); |
| 19 |
g(8); |
| 20 |
} |
| 21 |
|
| 22 |
/* |
| 23 |
TEST_OUTPUT: |
| 24 |
--- |
| 25 |
fail_compilation/bug15613.d(35): Error: function `h` is not callable using argument types `(int, void function(int[]...))` |
| 26 |
fail_compilation/bug15613.d(35): cannot pass argument `& h` of type `void function(int[]...)` to parameter `int[]...` |
| 27 |
fail_compilation/bug15613.d(31): `bug15613.h(int[]...)` declared here |
| 28 |
--- |
| 29 |
*/ |
| 30 |
|
| 31 |
void h(int[]...); |
| 32 |
|
| 33 |
void test() |
| 34 |
{ |
| 35 |
h(7, &h); |
| 36 |
} |