| 1 |
// https://issues.dlang.org/show_bug.cgi?id=20800 |
| 2 |
|
| 3 |
/* |
| 4 |
TEST_OUTPUT: |
| 5 |
---- |
| 6 |
fail_compilation/fail20800.d(23): Error: function `fun` is not callable using argument types `(string)` |
| 7 |
fail_compilation/fail20800.d(23): cannot pass argument `(m()).index()` of type `string` to parameter `int a` |
| 8 |
fail_compilation/fail20800.d(19): `fail20800.fun(int a)` declared here |
| 9 |
---- |
| 10 |
*/ |
| 11 |
|
| 12 |
struct RegexMatch |
| 13 |
{ |
| 14 |
string index() { return null; } |
| 15 |
~this() { } |
| 16 |
} |
| 17 |
static m() { return RegexMatch(); } |
| 18 |
|
| 19 |
void fun(int a); |
| 20 |
|
| 21 |
void initCommands() |
| 22 |
{ |
| 23 |
fun(m.index); |
| 24 |
} |