-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
itype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymorestat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label
Description
Based on failure in OpenCB for:
- eed3si9n/jarjar-abrams - build logs
- sbt/io - build logs
Found in : java.io.InputStream is a correct input type, however existance of shadowed in: java.nio.Path in the scope breaks the compilation
Compiler version
Last good release: 3.8.0-RC1-bin-20251103-714f3b6-NIGHTLY
First bad release: 3.8.0-RC1-bin-20251104-b83b3d9-NIGHTLY
Bisect points to one of:
f3aea49
5b03dca
Both are commits from #24231
Not present in 3.8.0-RCs, merged after 3.8.0 cutoff, but before change of build developed version
Minimized code
import java.io.*
import java.nio.file.*
abstract class Using[Source, A]:
def apply[R](src: Source)(f: A => R): R = ???
object Using:
val fileInputStream: Using[Path, InputStream] = ???
def transfer(in: Path, out: OutputStream): Unit =
Using.fileInputStream(in)(in => transfer(in, out))
def transfer(in: InputStream, out: OutputStream): Unit = ???Output
-- [E007] Type Mismatch Error: /Users/wmazur/projects/scala/community-build3/test.scala:12:43
12 | Using.fileInputStream(in)(in => transfer(in, out))
| ^^
| Found: (in : java.io.InputStream)
| Required: java.nio.file.Path
|
| longer explanation available when compiling with `-explain`
Expectation
Should continue to compile
Metadata
Metadata
Assignees
Labels
itype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymorestat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label