Use precise type for x in case x @ (_: A, _: B)#25734
Closed
SolalPirelli wants to merge 4 commits into
Closed
Conversation
Contributor
Author
|
@noti0na1 how bad do you think this is? it works and I have no other idea but I don't like it that much |
Contributor
Author
Member
|
I don't have specific opinion on this issue, I don't like the fix neither... |
d812ec3 to
1f51b09
Compare
SolalPirelli
commented
May 21, 2026
| local1 => val local inObj: Obj[In] & Repr[In] | ||
| local2 => val local outObj: Obj[Out] & Repr[Out] | ||
| local1 => val local inObj: Obj[In] | ||
| local2 => val local outObj: Obj[Out] |
Contributor
Author
There was a problem hiding this comment.
the source is case (inObj: Obj[In], outObj: Obj[Out]) so this makes sense to me
bishabosha
reviewed
May 22, 2026
| local0 => val local out: Repr[Out] | ||
| local1 => val local inObj: Obj[In] & Repr[In] | ||
| local2 => val local outObj: Obj[Out] & Repr[Out] | ||
| local1 => val local inObj: Obj[In] |
Member
There was a problem hiding this comment.
isnt this suspicious - it is now a less precise type? unless Obj is already Repr
Member
|
should probably ask some GADT experts |
Linyxus
reviewed
May 22, 2026
Contributor
Linyxus
left a comment
There was a problem hiding this comment.
It doesn't look wrong to me, but indeed feels quite adhoc and hacky.
1f51b09 to
3321921
Compare
Contributor
Author
|
Closing in favor of #26161 which is slightly less bad |
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 #25544
I'm not a big fan of this, but it works, so it's a good first step in getting someone to tell me why it's actually bad and what should be done instead :)
How much have you relied on LLM-based tools in this contribution?
as much as som-snytt does
How was the solution tested?
issue regression test