summaryrefslogtreecommitdiff
path: root/src/partest
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-07 11:22:44 +0000
committerPaul Phillips <paulp@improving.org>2011-03-07 11:22:44 +0000
commitca392540e36bf1fc52350901b3faf5bc08f4175c (patch)
tree17fef00d7ae2c028cad1b72d02b85b657341c483 /src/partest
parent2edab8991bc07ce0eecb3a85d8317e31f98df840 (diff)
downloadscala-ca392540e36bf1fc52350901b3faf5bc08f4175c.tar.gz
scala-ca392540e36bf1fc52350901b3faf5bc08f4175c.tar.bz2
scala-ca392540e36bf1fc52350901b3faf5bc08f4175c.zip
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.
Diffstat (limited to 'src/partest')
-rw-r--r--src/partest/scala/tools/partest/ReplTest.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/partest/scala/tools/partest/ReplTest.scala b/src/partest/scala/tools/partest/ReplTest.scala
index 232d605bb0..b7bd8efcf4 100644
--- a/src/partest/scala/tools/partest/ReplTest.scala
+++ b/src/partest/scala/tools/partest/ReplTest.scala
@@ -17,3 +17,13 @@ abstract class ReplTest extends App {
show()
}
+
+trait SigTest {
+ 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 " ")
+}