Remove whitebox cast from GenIso.fields#1602
Merged
Merged
Conversation
Contributor
Author
|
Ah, I didn't see #1600. I will rebase. Removing |
Declare the honest supertype PIso[S, S, ?, ?] instead, as optics-dev#1574 did for IsoFields. All match arms conform without a cast, and transparent inline still infers the precise type at call sites. This also fixes the master build, broken since optics-dev#1574. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
01117f2 to
ea22e64
Compare
Member
|
Yes it does! |
julien-truffaut
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
masterbuild, broken since #1574: the fallback arm ofGenIso._fieldspassed the new wildcard-typedIsoFields[S]expression towhitebox[A](e: Expr[Iso[S, A]]), which no longer typechecks.Rather than patching the cast, remove
whiteboxentirely and declare the honest supertypePIso[S, S, ?, ?], as #1574 did forIsoFields. All match arms conform without a cast, andtransparent inlinestill infers the precise type at call sites.Verified with
sbt 'project rootJVM' '++ 3' test(all tests pass, includingGenIso.fieldson 0-, 1- and 2-field case classes) andscalafmtCheck.🤖 Generated with Claude Code