Skip to content

Adding a private lazy val introduces a binary incompability in Scala 3 #794

@MaciejG604

Description

@MaciejG604

Discovered in com-lihaoyi/os-lib#239

When building with Scala 3.1.3
Changing:

package object bar {
  val foo = compute
}

to

package object bar {
  private lazy val _foo = compute
  def foo = _foo
}

Breaks binary compatibility. Is this expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions