Skip to content

False positive InheritedNewAbstractMethodProblem? #807

Open
@clee704

Description

@clee704

Before working on this issue, I'd like to check if I'm missing something.

Version 1:

trait A {
  def foo(a: Int) = println(s"A.foo $a")
}
trait B extends A

Version 2:

trait A {
  def foo(a: Int) = println(s"A.foo $a")
}
trait AA extends A {
  override def foo(a: Int) = {
    if (a > 0) {
      println(s"AA.foo $a")
    } else {
      super.foo(a)
    }
  }
}
trait B extends AA

App:

object App {
  def main(args: Array[String]): Unit = {
    val b = new B {}
    b.foo(1)
    b.foo(-1)
  }
}

I think this is a false positive, but MiMa gives abstract synthetic method AA$$super$foo(Int)Unit in interface AA is inherited by class B in new version..

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