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] ./main.scala:11:14:Type argument ?1.CAP does not conform to upper bound Bound[?1.CAP] in inferred typeMyClass[?1.CAP]
[error] m.doSth()
[error]
Expectation
Compile correctly.
After small changes to make the code compatible with Scala 2 (adding an outer object for def), it compiles correctly in 2.13.8.
Compiler version
3.0.0
,3.1.0
,3.1.2-RC1-bin-20220111-1292246-NIGHTLY
Minimized code
Output
Expectation
Compile correctly.
After small changes to make the code compatible with Scala 2 (adding an outer
object
fordef
), it compiles correctly in2.13.8
.Workaround
The workaround for this is to add a pure expression after
m.doSth()
. The following code compiles:The text was updated successfully, but these errors were encountered: