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

// error
//
// :3:22: error: expected struct type, found 'i32'