From ca392540e36bf1fc52350901b3faf5bc08f4175c Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 7 Mar 2011 11:22:44 +0000 Subject: More signature work arising from actually looki... More signature work arising from actually looking at the signatures. Slightly improved the coverage of the tests. No review. --- test/files/run/bug4238/J_1.java | 14 +++++++++++++- test/files/run/bug4291.scala | 10 ++-------- 2 files changed, 15 insertions(+), 9 deletions(-) (limited to 'test/files') diff --git a/test/files/run/bug4238/J_1.java b/test/files/run/bug4238/J_1.java index 1cc8058385..47a9c21000 100644 --- a/test/files/run/bug4238/J_1.java +++ b/test/files/run/bug4238/J_1.java @@ -1,4 +1,16 @@ +import scala.*; + class J_1 { - scala.collection.mutable.HashMap x = + scala.collection.mutable.HashMap map = new scala.collection.mutable.HashMap(); + + Function1, Integer> f = + new scala.runtime.AbstractFunction1, Integer>() { + public Integer apply(Tuple2 s) { + return s._1().length(); + } + }; + + scala.collection.Seq counts = + map.groupBy(f).keys().toList(); } diff --git a/test/files/run/bug4291.scala b/test/files/run/bug4291.scala index 3eeaa88be0..6053c7ac6a 100644 --- a/test/files/run/bug4291.scala +++ b/test/files/run/bug4291.scala @@ -1,12 +1,6 @@ -object Test { - def returnType[T: Manifest](methodName: String) = ( - classManifest[T].erasure.getMethods - . filter (x => !x.isBridge && x.getName == methodName) - . map (_.getGenericReturnType.toString) - ) - def show[T: Manifest](methodName: String) = - println(manifest[T].erasure.getName +: returnType[T](methodName).distinct mkString " ") +import scala.tools.partest._ +object Test extends SigTest { def main(args: Array[String]): Unit = { show[List[_]]("apply") show[Option[_]]("get") -- cgit v1.2.3