Skip to content

fix: panic on embedded struct with recursive#483

Merged
goccy merged 2 commits into
goccy:masterfrom
NgoKimPhu:fix/recurse-anonymous-panic
Oct 28, 2025
Merged

fix: panic on embedded struct with recursive#483
goccy merged 2 commits into
goccy:masterfrom
NgoKimPhu:fix/recurse-anonymous-panic

Conversation

@NgoKimPhu

@NgoKimPhu NgoKimPhu commented Nov 3, 2023

Copy link
Copy Markdown
Contributor

This PR fixes #459 (panic on embedded struct with recursive) and #468 which is caused by a missing population of anonymous struct fields into encoder.compileContext.structTypeToCodes in the logic of encoder.StructCode.ToAnonymousOpcode.

@NgoKimPhu NgoKimPhu force-pushed the fix/recurse-anonymous-panic branch from 2cfcb0c to 078b728 Compare November 4, 2023 03:42
@NgoKimPhu NgoKimPhu force-pushed the fix/recurse-anonymous-panic branch from 078b728 to b7136cc Compare November 4, 2023 03:45
@njucjc

njucjc commented Aug 2, 2024

Copy link
Copy Markdown

ready to merge, I meet same issue

@hanord

hanord commented Dec 13, 2024

Copy link
Copy Markdown

I've seen the same issue @goccy and can confirm that the PR did fix the issue for us.
Is there a reason it wasn't included in 0.10.4?

@takanuva15

Copy link
Copy Markdown

@goccy can we merge this PR to fix the issue for our codebase as well?

@dovudwkt

Copy link
Copy Markdown

Any chance this will be merged?

@goccy

goccy commented Oct 28, 2025

Copy link
Copy Markdown
Owner

Thank you for your contribution!
LGTM

@goccy goccy merged commit e4877d5 into goccy:master Oct 28, 2025
@NgoKimPhu NgoKimPhu deleted the fix/recurse-anonymous-panic branch November 3, 2025 07:56
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.

[Bug] panic on embedded struct with recursive

6 participants