-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bug
Description
Compiler version
3.7.0 and up
Minimized code
//> using options --rewrite -Wunused:imports
def test: Unit = {
import scala.compiletime.testing.typeCheckErrors
typeCheckErrors("2 + 2")
}
Output
[warn] ./a.scala:4:36
[warn] unused import
[warn] import scala.compiletime.testing.typeCheckErrors
[warn] ^^^^^^^^^^^^^^^
Recompiling with the import incorrectly removed:
- scala 3.7.0, 3.7.3 (compilation successful ???):
[warn] ./a.scala:4:36
[warn] unused import
[warn] typeCheckErrors("2 + 2")
[warn] ^^^^^^^^^^^^^^^
- 3.7.1, 3.7.2, 3.8.0-RC1-bin-20250912-c4c48e3-NIGHTLY:
[error] ./a.scala:4:3
[error] Not found: typeCheckErrors
[error] typeCheckErrors("2 + 2")
[error] ^^^^^^^^^^^^^^^
Expectation
No warning
Metadata
Metadata
Assignees
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bug