Closed
Description
Compiler version
3.2.0-RC1-bin-20220308-29073f1-NIGHTLY
Minimized code
Minimized repository & Actions output
Namely, two files:
src/main/scala/
├─ A.scala
├─ p/
│ ├─ p.scala
// p/p.scala
package p
object M {
class C[N]()
}
export M.*
// A.scala
import p.*
type NAME = C[?]
Then we perform the following steps:
- Compile
- In file
A.scala
, renameNAME
to something else - Compile
(above steps as shell commands)
sbt compile
sed -i 's/NAME/NAME2/g' src/main/scala/A.scala
sbt compile
Output
The second compilation fails (step (3)):
-- [E043] Type Error: /home/runner/work/sbt-incremental-compilation-bug/sbt-incremental-compilation-bug/src/main/scala/A.scala:3:13
3 |type NAME2 = C[?]
| ^^^^
| unreducible application of higher-kinded type p.C to wildcard arguments
|
| longer explanation available when compiling with `-explain`
Expectation
Step (3) should succeed.