summaryrefslogtreecommitdiff
path: root/test/pending/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/run')
-rw-r--r--test/pending/run/t4511.scala10
-rw-r--r--test/pending/run/t4971.scala16
-rw-r--r--test/pending/run/t5284.scala14
3 files changed, 40 insertions, 0 deletions
diff --git a/test/pending/run/t4511.scala b/test/pending/run/t4511.scala
new file mode 100644
index 0000000000..58d4e0c7b0
--- /dev/null
+++ b/test/pending/run/t4511.scala
@@ -0,0 +1,10 @@
+class Interval[@specialized T](val high: T)
+class Node[@specialized T](val interval: Interval[T]) {
+ val x1 = Some(interval.high)
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ new Node(new Interval(5)).x1
+ }
+} \ No newline at end of file
diff --git a/test/pending/run/t4971.scala b/test/pending/run/t4971.scala
new file mode 100644
index 0000000000..c9b6d6f39f
--- /dev/null
+++ b/test/pending/run/t4971.scala
@@ -0,0 +1,16 @@
+trait A[@specialized(Int) K, @specialized(Double) V] {
+ def doStuff(k: K, v: V): Unit = sys.error("I am overridden, you cannot call me")
+}
+
+trait B[@specialized(Double) V] extends A[Int, V] {
+ override def doStuff(k: Int, v: V): Unit = println("Hi - I'm calling doStuff in B")
+}
+
+object Test {
+ def main(args: Array[String]): Unit = delegate(new B[Double]() {}, 1, 0.1)
+
+ def delegate[@specialized(Int) K, @specialized(Double) V](a: A[K, V], k: K, v: V) {
+ a.doStuff(k, v)
+ }
+}
+
diff --git a/test/pending/run/t5284.scala b/test/pending/run/t5284.scala
new file mode 100644
index 0000000000..b43afed5b8
--- /dev/null
+++ b/test/pending/run/t5284.scala
@@ -0,0 +1,14 @@
+object Test {
+ def main(args:Array[String]) {
+ val a = Blarg(Array(1,2,3))
+ println(a.m((x:Int) => x+1))
+ }
+}
+
+object Blarg {
+ def apply[T:Manifest](a:Array[T]) = new Blarg(a)
+}
+class Blarg [@specialized T:Manifest](val a:Array[T]) {
+ def m[@specialized W>:T,@specialized S](f:W=>S) = f(a(0))
+}
+