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

// error
//
// :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