Closed
Description
Compiler version
3.3.0-RC4
Minimized code
import scala.collection.Map
import scala.annotation.nowarn
trait MyMap[K, +V] extends Map[K, V] {
@nowarn("""cat=deprecation&origin=scala\.collection\.Iterable\.stringPrefix""")
override protected[this] def stringPrefix: String = "MyMap"
}
Output
-- Warning: t/Test.scala:5:10 --------------------------------------------------
5 | @nowarn("""cat=deprecation&origin=scala\.collection\.Iterable\.stringPrefix""")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| Invalid message filter
| unknown filter: origin
-- Deprecation Warning: t/Test.scala:6:31 --------------------------------------
6 | override protected[this] def stringPrefix: String = "MyMap"
| ^
|overriding method stringPrefix in trait Iterable of type => String is deprecated;
| method stringPrefix of type => String should be removed or renamed.```
Expectation
Should compile without waninings