Skip to content

Fixes regression in Object.from_json [fixup #15840]#16142

Merged
straight-shoota merged 4 commits intocrystal-lang:masterfrom
Sija:fix-issue-16141
Sep 18, 2025
Merged

Fixes regression in Object.from_json [fixup #15840]#16142
straight-shoota merged 4 commits intocrystal-lang:masterfrom
Sija:fix-issue-16141

Conversation

@Sija
Copy link
Contributor

@Sija Sija commented Sep 7, 2025

Resolves #16141

@straight-shoota
Copy link
Member

straight-shoota commented Sep 8, 2025

Going with #16142 (comment) I'd suggest to just remove this type restriction. There's reasonable doubt that it's a good change, so we should revert it for now. These PRs adding type restrictions are usually very straightforward, but in this case it is not. If we want to change this, we should put in more thoughtful consideration.

@ysbaddaden ysbaddaden changed the title Fixes regression in Object.from_json Fixes regression in Object.from_json [fixup #15840] Sep 9, 2025
straight-shoota pushed a commit that referenced this pull request Sep 10, 2025
…ok (#16147)

As a bonus, it is now possible to refer to generic type variables inside converters (see #16142 (comment) for an example).
@straight-shoota straight-shoota added this to the 1.18.0 milestone Sep 12, 2025
@straight-shoota straight-shoota merged commit 56c8826 into crystal-lang:master Sep 18, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:regression Something that used to correctly work but no longer works topic:stdlib:serialization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression in Object.from_json

4 participants