Closed
Description
Open Community Builder failure based on the following projects:
- softwaremill/sttp - build logs
- greenfossil/thorium - build logs
Compiler version
3.4.0-RC1-bin-20231117-5bb6f0d-NIGHTLY
Bisect points to 171773d
Minimized code
import java.util.Map.Entry;
import java.util.function.BiConsumer;
import java.lang.Iterable
trait HttpHeaders extends Iterable[Entry[String, String]] {
def forEach(action: BiConsumer[String, String]): Unit = ???
}
@main def Test =
val headers: HttpHeaders = ???
headers.forEach((a, b) => ???)
Output
-- [E086] Syntax Error: /Users/wmazur/projects/dotty/bisect/main.scala:11:25 ---
11 | headers.forEach((a, b) => ???)
| ^^^^^^^^^^^^^
| Wrong number of parameters, expected: 1
|
Expectation
Should compile. Compiler should use the overloaded variant of forEach
method taking a BiConsumer
instead of Consumer[Entry[String,String]
defined in Java stdlib.