master
1pub export fn entry1() void {
2 const optional_fn: ?fn () void = null;
3 _ = optional_fn();
4}
5pub export fn entry2() void {
6 const optional_fn_ptr: ?*const fn () void = null;
7 _ = optional_fn_ptr();
8}
9
10// error
11//
12// :3:9: error: cannot call optional type '?fn () void'
13// :3:9: note: consider using '.?', 'orelse' or 'if'
14// :7:9: error: cannot call optional type '?*const fn () void'
15// :7:9: note: consider using '.?', 'orelse' or 'if'