diff options
Diffstat (limited to 'tests/disabled/not-representable/hkt/hkt.scala')
-rw-r--r-- | tests/disabled/not-representable/hkt/hkt.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/disabled/not-representable/hkt/hkt.scala b/tests/disabled/not-representable/hkt/hkt.scala new file mode 100644 index 000000000..1a9932d73 --- /dev/null +++ b/tests/disabled/not-representable/hkt/hkt.scala @@ -0,0 +1,18 @@ +// This one is unavoidable. Dotty does not allow several overloaded +// parameterless methods, so it picks the one in the subclass. + +import scala.language.higherKinds +// Minimal reproduction for: +// scala.collection.mutable.ArrayStack.empty[Int] + +abstract class Super[C[_]] { + def empty[T]: C[T] = ??? +} + +class Child[T] + +object Child extends Super[Child] { + def empty: Child[Nothing] = new Child() + + Child.empty[Int] +} |