bug icon indicating copy to clipboard operation
bug copied to clipboard

bogus warning about usage of package-private types in method signatures

Open scabug opened this issue 10 years ago • 3 comments

package ws

private[ws] trait Foo
private[ws] object Test {
  class Bar {
    def apply(f: Foo) = ???
  }
}

This leads to: «method apply in class Bar references private[ws] trait Foo. Classes which cannot access Foo may be unable to override apply.» This is obviously a non-problem.

scabug avatar Sep 25 '15 09:09 scabug

Imported From: https://issues.scala-lang.org/browse/SI-9490?orig=1 Reporter: @rkuhn Affected Versions: 2.10.5, 2.11.7

scabug avatar Sep 25 '15 09:09 scabug

Linked ticket ("linket") shows sealed trait.

som-snytt avatar Dec 03 '21 17:12 som-snytt

the warning is only produced under -Xlint and the problem still exists in 2.13.8.

SethTisue avatar Aug 25 '22 18:08 SethTisue