-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modification via a type alias failing on Scala 3 #97
Modification via a type alias failing on Scala 3 #97
Conversation
It most likely just needs a EDIT: nvm, it actually requires a bunch of |
I have added a commit inverting the case class / sealed trait logic. Anything which does not require a special handling is handled as a case class, hoping it will behave like one. This does not fix the issue yet, but it could make the code a bit more robust when handing unexpected situations.
I will try to drop some at random source location and see where it works. 😊 |
It's pretty much before any |
I'm not sure if that's what we want. The condition for |
f2d3d4e
to
0a1f8c5
Compare
OK. I will leave that out. It is certainly not needed for the fix and it is not related, therefore I should not have mixed it here. |
0a1f8c5
to
3d14033
Compare
Tests pass. I think the PR should be ready for review / merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a suggestion with a test case for the other case (sealed tarit
/enum
) that would still fail.
I cannot add comments there, but two more .widen.dealias
calls will be needed before accessing .typeSymbol.children
.
quicklens/src/test/scala/com/softwaremill/quicklens/ModifyAliasTest.scala
Show resolved
Hide resolved
quicklens/src/test/scala/com/softwaremill/quicklens/ModifyAliasTest.scala
Show resolved
Hide resolved
Co-authored-by: Kacper Korban <[email protected]>
Co-authored-by: Kacper Korban <[email protected]>
dfc6e1c
to
9802d63
Compare
Another Scala 3 regression. Following code fails to compile:
The error is:
I think hopefully I should be able to prepare a fix.