Sema: pass c_import_buf to child block in more places

Closes  #13651
This commit is contained in:
Veikka Tuominen
2022-11-25 23:28:50 +02:00
parent 587ef60a28
commit fe38898246
3 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,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