## Compiler version 3.1.0 ## Minimized code <!-- This code should be self contained, compilable (with possible failures) and as small as possible. Ideally, we should be able to just copy this code in a file and run `scalac` (and maybe `scala`) to reproduce the issue. --> ```Scala // -Yforce-sbt-phases -Yexplicit-nulls import java.nio.file.FileSystems def directorySeparator: String = { import scala.language.unsafeNulls FileSystems.getDefault().getSeparator() } ``` ## Output ```scala -- Error: foo.scala:5:39 ------------------------------------------------------- 5 | FileSystems.getDefault().getSeparator() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |undefined: java.nio.file.FileSystems.getDefault().getSeparator # -1: TermRef(OrType(TypeRef(ThisType(TypeRef(NoPrefix,module class file)),class FileSystem),TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Null)),getSeparator) at sbt-api 1 error found ``` ## Expectation extractAPI maybe ignores this?