Open
Description
object Test {
trait A { a =>
type X
val x: a.X
}
val a = new A {
type X = Int
val x = 1
}
def f(arg: A): arg.X = arg.x
val x = f(a: A)
}
snippet from -Xprint:typer:
...
private[this] val x: arg.X = Test.this.f((Test.this.a: Test.A));
<stable> <accessor> def x: arg.X = Test.this.x
...
arg is not in scope...
I don't know yet how to turn this into a true soundness issue, but it's weird.