d: Merge dmd. druntime e770945277, phobos 6d6e0b9b9
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail20800.d
blob4464222f237119b00d19c92f48422d80d2c1f357
1 // https://issues.dlang.org/show_bug.cgi?id=20800
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 ----
12 struct RegexMatch
14 string index() { return null; }
15 ~this() { }
17 static m() { return RegexMatch(); }
19 void fun(int a);
21 void initCommands()
23 fun(m.index);