aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/assign_null_to_non-optional_pointer.zig
blob: cc410e62289a8b5c55e076ba8bfa174a05bed6d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
const a: *u8 = null;

export fn entry() usize {
    return @sizeOf(@TypeOf(a));
}

// error
// backend=stage2
// target=native
//
// :1:16: error: expected type '*u8', found '@TypeOf(null)'