mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
24 lines
550 B
D
24 lines
550 B
D
// https://issues.dlang.org/show_bug.cgi?id=20800
|
|
|
|
/*
|
|
TEST_OUTPUT:
|
|
----
|
|
fail_compilation/fail20800.d(23): Error: function `fun` is not callable using argument types `(string)`
|
|
fail_compilation/fail20800.d(23): cannot pass argument `(m()).index()` of type `string` to parameter `int a`
|
|
fail_compilation/fail20800.d(19): `fail20800.fun(int a)` declared here
|
|
----
|
|
*/
|
|
|
|
struct RegexMatch
|
|
{
|
|
string index() { return null; }
|
|
~this() { }
|
|
}
|
|
static m() { return RegexMatch(); }
|
|
|
|
void fun(int a);
|
|
|
|
void initCommands()
|
|
{
|
|
fun(m.index);
|
|
}
|