aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/cimport.zig
blob: 855f9aeb40abd7a3b178fa2847b5bd0261b58226 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const b = @cDefine("foo", "1");
const c = @cImport({
    _ = @TypeOf(@cDefine("foo", "1"));
});
const d = @cImport({
    _ = @cImport(@cDefine("foo", "1"));
});

// error
// backend=stage2
// target=native
//
// :1:11: error: C define valid only inside C import block
// :3:17: error: C define valid only inside C import block
// :6:9: error: cannot nest @cImport