Skip to content

ast-exporter: handle foreign/extern enums properly#1743

Open
Rua wants to merge 1 commit intoimmunant:masterfrom
Rua:foreign-enum
Open

ast-exporter: handle foreign/extern enums properly#1743
Rua wants to merge 1 commit intoimmunant:masterfrom
Rua:foreign-enum

Conversation

@Rua
Copy link
Copy Markdown
Contributor

@Rua Rua commented Apr 15, 2026

getDefinition returns NULL if there is no definition, only a forward declaration. That would then be exported as node number 0, which would not have any valid decl associated with it. This PR adds a check for the NULL case and uses the canonical decl instead.

@Rua Rua marked this pull request as ready for review April 16, 2026 09:44
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.

transpile: Panic on forward declared enum

1 participant