rsc
rsc copied to clipboard
Use the nearest in-scope ancestor
package foo
class A
object B {
def default: B = new B
}
private[foo] class B extends A
package bar
val x = B.default
In this case, we might consider ascribing type A to x since B is private[foo]. On the other hand, we can also warn or error.
Note: this is unlikely to have high return on investment for the kind targets we've run RscCompat on (apparently this is rare-ish).