Skip to content

fix: avoid collisions in duplicate-name suffixes - #61

Open
henryiii wants to merge 1 commit into
masterfrom
fix-doc-suffix-collision
Open

fix: avoid collisions in duplicate-name suffixes#61
henryiii wants to merge 1 commit into
masterfrom
fix-doc-suffix-collision

Conversation

@henryiii

@henryiii henryiii commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

Addresses finding 6 in #59.

write_header gives duplicate names a _N suffix, so overloads foo, foo become foo, foo_2. If the input also has a real symbol named foo_2, the generated header declares mkd_doc_foo_2 twice and does not compile. The counter now skips suffixes that a real symbol or an earlier generated name already uses.

Adds a regression test with an overloaded foo plus real foo_2 and foo_3 symbols.

Overloads get a `_N` suffix, but the suffixed name could match a real symbol
with that name in the input. The generated header then declared the same
identifier twice and did not compile. Skip suffixes that a real symbol or an
earlier generated name already uses.

Assisted-by: ClaudeCode:claude-fable-5
@henryiii
henryiii marked this pull request as draft August 6, 2026 18:18
@henryiii henryiii closed this Aug 7, 2026
@henryiii henryiii reopened this Aug 7, 2026
@henryiii
henryiii marked this pull request as ready for review August 7, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant