blob: 6c0369fffd036ec9d5eca2060e9f3941d7c1ef9c (
plain) (
tree)
|
|
object Test {
def main(args: Array[String]): Unit = {
val i2s = (x: Int) => ""
assert(i2s.asInstanceOf[AnyRef => String].apply(null) == "")
val i2i = (x: Int) => x + 1
assert(i2i.asInstanceOf[AnyRef => Int].apply(null) == 1)
}
}
|