diff options
| author | Yong He <yonghe@outlook.com> | 2025-10-10 17:31:01 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-11 00:31:01 +0000 |
| commit | fb34bafd37e3509d51686ee2a5392d2d8e29d7c5 (patch) | |
| tree | ca16f2f53595d730319396320b21ad15fada7a06 /tests/preprocessor/duplicate-include/a.slang | |
| parent | c99addbf2e8a0210b97dad2827045dad95765d08 (diff) | |
Add diagnostic for cyclic #include. (#8679)
Diffstat (limited to 'tests/preprocessor/duplicate-include/a.slang')
| -rw-r--r-- | tests/preprocessor/duplicate-include/a.slang | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/preprocessor/duplicate-include/a.slang b/tests/preprocessor/duplicate-include/a.slang new file mode 100644 index 000000000..ce2c22b61 --- /dev/null +++ b/tests/preprocessor/duplicate-include/a.slang @@ -0,0 +1,13 @@ +//TEST:INTERPRET(filecheck=CHECK): + +// Test that it is OK to include the same file multiple times. + +#include "b.slang" + +#include "b.slang" + +void main() +{ + // CHECK: result: 23 + printf("result: %d\n", foo()); +} |
