Skip to content

Fix #378: Blackbird record codegen for generic record components - #379

Open
phraktle wants to merge 1 commit into
FasterXML:3.3from
phraktle:blackbird-generic-record-component
Open

phraktle wants to merge 1 commit into
FasterXML:3.3from
phraktle:blackbird-generic-record-component

Conversation

@phraktle

@phraktle phraktle commented Nov 9, 2026

Copy link
Copy Markdown

Fixes #378.

generateRecord required each property's resolved type to equal the record component type, which never holds for a component declared through a type variable (T erases to its bound). The generated code passes components to the erased canonical constructor, so an assignable type is enough.

Test: BBCodecGenericRecordTest checks codegen engages for Envelope<Payload> and a bounded Bounded<Integer>, and values match vanilla, including an absent T component, a container argument and the raw type.

…ents

A component declared through a type variable erases to its bound while the
property carries the resolved type; accept an assignable type instead of
requiring an exact match.
@cowtowncoder cowtowncoder added blackbird Issue related to Blackbird module 3.3 cla-received PR already covered by CLA (optional label) labels Nov 10, 2026
@cowtowncoder

Copy link
Copy Markdown
Member

3.3 is the right branch -- excellent.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.3 blackbird Issue related to Blackbird module cla-received PR already covered by CLA (optional label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blackbird 3.3.0: record codegen gated off for generic record components

2 participants