summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t7584.scala11
-rw-r--r--test/files/pos/t7902.scala17
2 files changed, 17 insertions, 11 deletions
diff --git a/test/files/pos/t7584.scala b/test/files/pos/t7584.scala
deleted file mode 100644
index 52d127ecb9..0000000000
--- a/test/files/pos/t7584.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-object Test {
- def fold[A, B](f: (A, => B) => B) = ???
- def f[A, B](x: A, y: B): B = ???
- def bip[A, B] = fold[A, B]((x, y) => f(x, y))
- def bop[A, B] = fold[A, B](f)
-
- // these work:
- fold[Int, Int]((x, y) => f(x, y))
- fold[Int, Int](f)
-}
-
diff --git a/test/files/pos/t7902.scala b/test/files/pos/t7902.scala
new file mode 100644
index 0000000000..47c525c179
--- /dev/null
+++ b/test/files/pos/t7902.scala
@@ -0,0 +1,17 @@
+import scala.language.higherKinds
+
+object Bug {
+ class Tag[W[M1[X1]]]
+
+ def ofType[W[M2[X2]]]: Tag[W] = ???
+ type InSeq [M3[X3]] = Some[M3[Any]]
+
+ // fail
+ val x = ofType[InSeq]
+
+ // okay
+ val y: Any = ofType[InSeq]
+ object T {
+ val z = ofType[InSeq]
+ }
+}