Skip to content

-release 8 causes java.time.Instant to have a fictitious constructor #12565

Closed
scala/scala
#9981
@Jasper-M

Description

@Jasper-M

Reproduction steps

scalaVersion := "2.13.8"

scalacOptions ++= List("-release", "8")
Welcome to Scala 2.13.8 (OpenJDK 64-Bit Server VM, Java 11.0.14).
Type in expressions for evaluation. Or try :help.

scala> new java.time.Instant
java.lang.NoSuchMethodError: java.time.Instant: method 'void <init>()' not found
  ... 35 elided

Problem

java.time.Instant doesn't have a default constructor but the compiler seems to think that it does.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions