Skip to content

Name hashing invalidation is sensitive to private members #2324

@gkossakowski

Description

@gkossakowski

Compile:

// A.scala
object A {
  private def foo: Int = 1
  def bar: Int = 29
  def xyz: Int = 101
}
// B.scala
class B {
  private def foo: Int = 1
  def baz(): Unit = println(foo, A.xyz)
}

Modify A.scala to become:

object A {
  private def foo: String = "1"
  def bar: String = "29"
  def xyz: Int = 101
}

Compile again and notice that B.scala is recompiled. It's not expected because bar is not used by B.scala and foo is private.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions