d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / match_func_ptr.d
blob7f59183f2ceb0194ca71bb87f8ddf0fad54863de
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/match_func_ptr.d(13): Error: cannot match delegate literal to function pointer type `void function()`
5 fail_compilation/match_func_ptr.d(14): Error: cannot match function literal to delegate type `void delegate()`
6 fail_compilation/match_func_ptr.d(15): Error: cannot infer parameter types from `int function()`
7 fail_compilation/match_func_ptr.d(16): Error: cannot infer parameter types from `int delegate(int, int)`
8 ---
9 */
11 void main()
13 void function() f = delegate {};
14 void delegate() d = function {};
15 int function() f2 = i => 2;
16 int delegate(int, int) d2 = i => 2;