Commit f2fcacb
authored
ImportC: Add test for function-like macro calling another macro (#22349)
* ImportC: Add test for function-like macro calling another macro
Tests the `if (params) break;` branch in TOK.identifier case,
ensuring function-like macros with identifier bodies are handled
by caseFunctionLike, not the new nullary template path.
* ImportC: Replace unreachable branch with assertion
When we reach TOK.identifier case, params is always false because
if params were true (macro name followed by '('), the next token
would be TOK.leftParenthesis, not TOK.identifier.1 parent 795e381 commit f2fcacb
File tree
3 files changed
+3
-2
lines changed- compiler
- src/dmd
- test/compilable
- imports
3 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5779 | 5779 | | |
5780 | 5780 | | |
5781 | 5781 | | |
5782 | | - | |
5783 | | - | |
| 5782 | + | |
5784 | 5783 | | |
5785 | 5784 | | |
5786 | 5785 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
0 commit comments