aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/offsetOf-non_struct.zig
blob: 8970fa86d9a778ba0ca2b63f3f083f6d36aebe08 (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'