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
Sorry for slightly long minimization, didn't manage to make it any shorter.
Behavior changed in 3.3.3, used to work fine in 2.13.13 and 3.3.1 at least. Test1 is the reproduction - D.print and B.print are not getting called Test2 has no with Z, which shouldn't matter, and yet it "fixes" the problem Test3 extends the X, Y and Z traits first instead of last like Test1, which also causes all prints to run
scala#20284 started breaking since we now balance AndTypes to avoid performance drops.
But (re-)balancing an AndType interferes with the logic that determines which
symbol is referred by a super select. This is fixed by two changes:
- Form types of super with `AndType` instead of `&`
- Don't simplify types of super since that would rebalance the underlying AndTypes.
Fixesscala#20284
scala#20284 started breaking since we now balance AndTypes to avoid performance drops.
But (re-)balancing an AndType interferes with the logic that determines which
symbol is referred by a super select. This is fixed by two changes:
- Form types of super with `AndType` instead of `&`
- Don't simplify types of super since that would rebalance the underlying AndTypes.
Fixesscala#20284
Sorry for slightly long minimization, didn't manage to make it any shorter.
Behavior changed in 3.3.3, used to work fine in 2.13.13 and 3.3.1 at least.
Test1
is the reproduction -D.print
andB.print
are not getting calledTest2
has nowith Z
, which shouldn't matter, and yet it "fixes" the problemTest3
extends theX
,Y
andZ
traits first instead of last likeTest1
, which also causes allprint
s to runCompiler version
3.3.1, 3.4.1
Minimized code
scala-cli run test.sc -S 3.3.3
test.sc
:Output
In scala 3.3.3 and 3.4.1:
In scala 2.13.13 and 3.3.1:
Expectation
Which super method calls are executed is not affected by "extra" traits
The text was updated successfully, but these errors were encountered: