aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/offsetOf-non_struct.zig
blob: 45e9cf9518fb469b3e0e07f5ec2fc448a9bbe7e2 (plain)
1
2
3
4
5
6
7
8
9
10
const Foo = i32;
export fn foo() usize {
    return @offsetOf(Foo, "a",);
}

// error
// backend=stage2
// target=native
//
// :3:22: error: expected struct type, found 'i32'