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
Following code works fine with Scala 2 but fails with Scala 3:
caseclassC(protectedvalid:Int)
Surface.of[C]
The error is:
value id cannot be accessed as a member of (x : Main.C) from module class Main$.
Access to protected value id not permitted because enclosing object Main
is not a subclass of class C in object Main where target is defined
Note: the same works fine with private val.
The text was updated successfully, but these errors were encountered:
Following code works fine with Scala 2 but fails with Scala 3:
The error is:
Note: the same works fine with
private val
.The text was updated successfully, but these errors were encountered: