summaryrefslogtreecommitdiff
path: root/test/files/run/t5488-fn.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t5488-fn.scala')
-rw-r--r--test/files/run/t5488-fn.scala26
1 files changed, 2 insertions, 24 deletions
diff --git a/test/files/run/t5488-fn.scala b/test/files/run/t5488-fn.scala
index 9e4f60002b..d17bcf90a5 100644
--- a/test/files/run/t5488-fn.scala
+++ b/test/files/run/t5488-fn.scala
@@ -1,8 +1,5 @@
-class B[@specialized(Int, AnyRef, Unit) A, @specialized(Int, Unit) B](f: A => B)
-class C[@specialized(Int, AnyRef) A, @specialized(Int, AnyRef) B, @specialized(Int) C](f: (A, B) => C)
-// Not yet:
-// class B[@specialized(Int, AnyRef, Unit) A, @specialized(Int, AnyRef, Unit) B](f: A => B)
-// class C[@specialized(Int, AnyRef) A, @specialized(Int, AnyRef) B, @specialized(Int, AnyRef) C](f: (A, B) => C)
+class B[@specialized(Int, AnyRef, Unit) A, @specialized(Int, AnyRef, Unit) B](f: A => B)
+class C[@specialized(Int, AnyRef) A, @specialized(Int, AnyRef) B, @specialized(Int, AnyRef) C](f: (A, B) => C)
object Test {
def main(args:Array[String]) {
@@ -28,22 +25,3 @@ object Test {
show(new C((x: AnyRef, y: AnyRef) => "abc"))
}
}
-/** If the return types are specialized on AnyRef as well:
-
-files/run/t5488-fn.scala:18: error: type mismatch;
- found : Unit => String
- required: Unit => B$sp
- show(new B((x: Unit) => "abc"))
- ^
-files/run/t5488-fn.scala:24: error: type mismatch;
- found : (Int, Object) => String
- required: (Int, B$sp) => C$sp
- show(new C((x: Int, y: AnyRef) => "abc"))
- ^
-files/run/t5488-fn.scala:26: error: type mismatch;
- found : (Object, Int) => String
- required: (A$sp, Int) => C$sp
- show(new C((x: AnyRef, y: Int) => "abc"))
- ^
-three errors found
-**/