Open
Description
I referred to #7780.
In Scala 3, A private global class in the field or return type of a method,
I interpreted that the members themselves do not need to be kept private.
// pkg/Factory.scala
package pkg
protected class Protected // Visible from pkg or its subpackages
private class Private // Same as above in Scala3(???)
object Factory {
def createProtected: Protected = new Protected()
def createPrivate : Private = new Private() // Error in Scala 2, but OK in Scala 3
}
So, I think that protected and private in the global class have the same meaning.
Is this correct?