13 lines
384 B
Zig
13 lines
384 B
Zig
const x = 3;
|
|
const y = &x;
|
|
fn foo() *const i32 { return y; }
|
|
export fn entry() usize { return @sizeOf(@TypeOf(&foo)); }
|
|
|
|
// error
|
|
// backend=stage2
|
|
// target=native
|
|
//
|
|
// :3:30: error: expected type '*const i32', found '*const comptime_int'
|
|
// :3:30: note: pointer type child 'comptime_int' cannot cast into pointer type child 'i32'
|
|
// :3:10: note: function return type declared here
|