| 1 | const x = 3; |
| 2 | const y = &x; |
| 3 | fn foo() *const i32 { |
| 4 | return y; |
| 5 | } |
| 6 | export fn entry() usize { |
| 7 | return @sizeOf(@TypeOf(&foo)); |
| 8 | } |
| 9 | |
| 10 | // error |
| 11 | // |
| 12 | // :4:12: error: expected type '*const i32', found '*const comptime_int' |
| 13 | // :4:12: note: pointer type child 'comptime_int' cannot cast into pointer type child 'i32' |
| 14 | // :3:10: note: function return type declared here |