Skip to content

extractAPI fails with unsafeNulls and Yexplicit-nulls #14319

Closed
@bishabosha

Description

@bishabosha

Compiler version

3.1.0

Minimized code

// -Yforce-sbt-phases -Yexplicit-nulls
import java.nio.file.FileSystems

def directorySeparator: String = {
  import scala.language.unsafeNulls
  FileSystems.getDefault().getSeparator()
}

Output

-- 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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions