Use the nearest in-scope ancestor
wiwa opened this issue · 1 comments
wiwa commented
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.
wiwa commented
Note: this is unlikely to have high return on investment for the kind targets we've run RscCompat on (apparently this is rare-ish).