You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found: List[Tuple.Union[(_$1 : (Playground.MyNum, Playground.MyNum))]]
Required: IterableOnce[Playground.MyNum]
Note: a match type could not be fully reduced:
trying to reduce Tuple.Union[(_$1 : (Playground.MyNum, Playground.MyNum))]
trying to reduce Tuple.Fold[(_$1 : (Playground.MyNum, Playground.MyNum)), Nothing,
[x, y] =>> x | y]
failed since selector (_$1 : (Playground.MyNum, Playground.MyNum))
does not uniquely determine parameters h, t in
case h *: t => h | Tuple.Fold[t, Nothing, [x, y] =>> x | y]
The computed bounds for the parameters are:
h <: Playground.MyNum
t <: Playground.MyNum *: EmptyTuple.type
Expectation
Should compile (as it does on 3.4.3) and give a flat list of MyNums.
The text was updated successfully, but these errors were encountered:
Given the bisect commit, I suspect that the new error is legitimate. It fixed an unsoundness issue (#19746), so it may very well prevent compilation of code that worked more-or-less by chance before.
Is my usage of Tuple's toList function unsound? Or does the current implementation of toList just incorrectly rely on unsound behavior that has been fixed in 3.5.0?
The signature of toList is
inlinedeftoList:List[Union[this.type]]
In its current state toList is quite limited. Any chance to get that improved?
@hegetim I think @sjrd meant that #19746 was an unsoundness issue (check the soundness label), and the fix for that caused this regression (that's where the bisect script points). We need to fix it separately.
Compiler version
Affected: 3.5.0 and newer (tested on Scastie up to 3.6.1)
Latest working version: 3.4.3
Minimized code
https://scastie.scala-lang.org/ZXMSKeMdT9SdHzvHdxVaQw
Output
Does not compile on 3.5.0 and newer:
Expectation
Should compile (as it does on 3.4.3) and give a flat list of
MyNum
s.The text was updated successfully, but these errors were encountered: