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