aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-09-16 22:43:24 +0300
committerGitHub <noreply@github.com>2016-09-16 22:43:24 +0300
commitc420b4cc0573e88bf301d4e020e2ad91b26806d0 (patch)
treec9aef9111054201e228577b3d58b61254bec3558 /tests/disabled
parent186f9551da6c7ace243c8e784f8eb5d6355af419 (diff)
parent062b4133db13bb77369cae81a5ec89e4b2bb6699 (diff)
downloaddotty-c420b4cc0573e88bf301d4e020e2ad91b26806d0.tar.gz
dotty-c420b4cc0573e88bf301d4e020e2ad91b26806d0.tar.bz2
dotty-c420b4cc0573e88bf301d4e020e2ad91b26806d0.zip
Merge pull request #1465 from dotty-staging/fix-#1457
Fix #1457: Three incompatbilities with scalac
Diffstat (limited to 'tests/disabled')
-rw-r--r--tests/disabled/not-representable/hkt/compiler.error6
-rw-r--r--tests/disabled/not-representable/hkt/hkt.scala18
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/disabled/not-representable/hkt/compiler.error b/tests/disabled/not-representable/hkt/compiler.error
new file mode 100644
index 000000000..b31760891
--- /dev/null
+++ b/tests/disabled/not-representable/hkt/compiler.error
@@ -0,0 +1,6 @@
+$ scalac tests/pending/hkt/*.scala
+$ ./bin/dotc tests/pending/hkt/*.scala
+tests/pending/hkt/hkt.scala:14: error: method empty in object Child does not take type parameters
+ Child.empty[Int]
+ ^
+one error found
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]
+}