You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
objectTest {
defcontains(s: String, i: Int) =truedeftest1= {
valf= contains("", (_: Int)) // dotc:
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)// ^
}
deftest2= {
valf="".contains("", (_: Int)) // dotc:
f.apply(0)
// sandbox/eta.scala:18: error: apply is not a member of Boolean(f)// f.apply(0)// ^
}
}
But with dotty, if tails with the compile errors inlined in comments above. Here's the post-typer AST:
This program compiles with scalac:
But with dotty, if tails with the compile errors inlined in comments above. Here's the post-typer AST:
Tested with edfb6e7
The text was updated successfully, but these errors were encountered: