summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t3936/BlockingQueue.java3
-rw-r--r--test/files/pos/t3936/Queue.java2
-rw-r--r--test/files/pos/t3936/Test.scala4
-rw-r--r--test/files/pos/t7584.scala11
4 files changed, 20 insertions, 0 deletions
diff --git a/test/files/pos/t3936/BlockingQueue.java b/test/files/pos/t3936/BlockingQueue.java
new file mode 100644
index 0000000000..b902d4528d
--- /dev/null
+++ b/test/files/pos/t3936/BlockingQueue.java
@@ -0,0 +1,3 @@
+package pack;
+import java.util.Queue;
+public interface BlockingQueue<E> extends Queue<E> { }
diff --git a/test/files/pos/t3936/Queue.java b/test/files/pos/t3936/Queue.java
new file mode 100644
index 0000000000..25c9087601
--- /dev/null
+++ b/test/files/pos/t3936/Queue.java
@@ -0,0 +1,2 @@
+package pack;
+public interface Queue { }
diff --git a/test/files/pos/t3936/Test.scala b/test/files/pos/t3936/Test.scala
new file mode 100644
index 0000000000..c867a05ec9
--- /dev/null
+++ b/test/files/pos/t3936/Test.scala
@@ -0,0 +1,4 @@
+package pack
+trait Test {
+ val b: BlockingQueue[Nothing]
+}
diff --git a/test/files/pos/t7584.scala b/test/files/pos/t7584.scala
new file mode 100644
index 0000000000..52d127ecb9
--- /dev/null
+++ b/test/files/pos/t7584.scala
@@ -0,0 +1,11 @@
+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)
+}
+