Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/match_func_ptr.d

raw
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 */
10
11 void main()
12 {
13 void function() f = delegate {};
14 void delegate() d = function {};
15 int function() f2 = i => 2;
16 int delegate(int, int) d2 = i => 2;
17 }