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
[error] 15|classEextendsD
[error] |^
[error] |Recursion limit exceeded.
[error] |Maybe there is an illegal cyclic reference?
[error] |If that's not the case, you could also try to increase the stacksize using the -XssJVM option.
[error] |For the unprocessed stack trace, compile with-Yno-decode-stacktraces.
[error] |A recurring operation is (inner to outer):
[error] |
[error] | find-member .T1
[error] | find-member .T2
[error] | ...
[error] |
[error] | find-member .T2
[error] | find-member .T1
Expectation
The code compiles with Scala 2, but not with Dotty.
Removing C fixes it in the MWE above, but is not possible in the original code where C has actual members.
Changing T1 in B to final override type T1 = Int prevents the bug, but was not necessary with Scala 2.
The text was updated successfully, but these errors were encountered:
In a sense the message makes sense. If we overlay what is defined in A and B we get T1 = T2 and T2 <: T1, hence T2 <: T2. That's a cycle. I don't think it's worth fixing in particular because the workaround is trivial. @dwijnand do you agree?
Compiler version
3.3.1
Minimized code
Output
Expectation
The code compiles with Scala 2, but not with Dotty.
Removing
C
fixes it in the MWE above, but is not possible in the original code where C has actual members.Changing
T1
inB
tofinal override type T1 = Int
prevents the bug, but was not necessary with Scala 2.The text was updated successfully, but these errors were encountered: