blob: 10168b61d31bc76073a22cfee3751da871fb9c38 (
plain) (
tree)
|
|
object overloadedAccess {
trait ST {
def f(x: Object): Int = 1
def f(x: Int): Unit = ()
}
object O extends ST {
def f(x: String): Unit = ()
}
class C extends ST {
import O._ // needs to pick inherited member because they are made visible in same scope.
val x = f("abc")
val y: Int = x
}
}
|