blob: 4e64e1af176b324511c15803baa44267c80d99f2 (
plain) (
tree)
|
|
object Test {
abstract class Box {
val value: Int
}
implicit val a: Box = new Box {
val value= 1
}
def main(args: Array[String]) {
implicit val b: Box= new Box {
val value= 2
}
new Object {
new Test()
}
// compare with:
new Test()
}
}
class Test()(implicit x: Test.Box) {
println(x.value)
}
|