| 1 | pub export fn entry() void { |
| 2 | comptime var x: fn (comptime i32, comptime i32) void = undefined; |
| 3 | x = bar; |
| 4 | } |
| 5 | pub export fn entry1() void { |
| 6 | comptime var x: fn (i32, i32) void = undefined; |
| 7 | x = foo; |
| 8 | } |
| 9 | |
| 10 | fn foo(comptime _: i32, comptime _: i32) void {} |
| 11 | fn bar(comptime _: i32, _: i32) void {} |
| 12 | |
| 13 | // error |
| 14 | // |
| 15 | // :3:9: error: expected type 'fn (comptime i32, comptime i32) void', found 'fn (comptime i32, i32) void' |
| 16 | // :3:9: note: non-comptime parameter 1 cannot cast into a comptime parameter |
| 17 | // :7:9: error: expected type 'fn (i32, i32) void', found 'fn (comptime i32, comptime i32) void' |
| 18 | // :7:9: note: generic function cannot cast into a non-generic function |