You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Denotation#matches instead of Types#matches, the former takes
signatures into account, in the testcase this is needed to ensure that
RefChecks does not emit an error about
`def foo[T <: Serializable](x: T): Unit` being an invalid override of
`def foo[T <: Cloneable](x: T): Unit`.
Note that our treatment of polymorphic methods differs from Scala 2
which seems to consider that two polymorphic methods with the same
number of type and term parameters always match and cannot be
overloads (see #8929), but it's closer to what Java does and allows us
to override some Java methods which scalac can't.
0 commit comments