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
When the inner class is marked private, Dotty will not generate an outer method. Verified this in the byte code. Making MyExc public will have the outer method generated. However, even when private, the bytecode generated in the for the PartialFunctions applyOrElse needs access to the outer instance to when checking to MyExc
Works fine in Scala 2
The text was updated successfully, but these errors were encountered:
Compiler version: 3.0.1
Minimized code
Scastie Link: https://scastie.scala-lang.org/AL4lT7w7RIuGUBPnhoCoTA
Output (Runtime, not compile time)
Expectation
When the inner class is marked private, Dotty will not generate an
outer
method. Verified this in the byte code. MakingMyExc
public will have the outer method generated. However, even when private, the bytecode generated in the for the PartialFunctionsapplyOrElse
needs access to the outer instance to when checking toMyExc
Works fine in Scala 2
The text was updated successfully, but these errors were encountered: