Closed
Description
given
class Foo[A]
sealed trait Trait[A] {
def overloaded(that: List[Trait[A]]): Trait[A] = that.head
def overloaded(that: List[Foo[A]]): Foo[A] = that.head
}
abstract class AbstractClass[A] extends Trait[A]
a java class
public class Failure extends AbstractClass<String>{
}
used to be possible, but is impossible in 2.13.0-RC1, and fails with
name clash: <A>overloaded(scala.collection.immutable.List<example.Foo<A>>) in example.Trait and <A>overloaded(scala.collection.immutable.List<example.Trait<A>>) in example.Trait have the same erasure, yet neither overrides the other
This regressed in scala/scala#7843