blob: c84cb16366c9f32e8a6ed1b8c4031b78ffc3c98c (
plain) (
tree)
|
|
object Test {
def contains(s: String, i: Int) = true
def test1 = {
val f = contains("", (_: Int))
val ff = contains("", ((_: Int)))
f.apply(0)
// sandbox/eta.scala:4: error: type mismatch:
// found : Int => Int
// required: Int
// val f = contains("", (_: Int))
// ^
// sandbox/eta.scala:5: error: apply is not a member of Boolean(f)
// f.apply(0)
// ^
}
def test2 = {
val f = "".contains("", (_: Int)) // dotc:
f.apply(0)
// sandbox/eta.scala:18: error: apply is not a member of Boolean(f)
// f.apply(0)
// ^
}
}
|