summaryrefslogtreecommitdiff
path: root/test/files/run/getClassTest-new.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/getClassTest-new.scala')
-rw-r--r--test/files/run/getClassTest-new.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/files/run/getClassTest-new.scala b/test/files/run/getClassTest-new.scala
index 89778ca2d3..7d8ec930f4 100644
--- a/test/files/run/getClassTest-new.scala
+++ b/test/files/run/getClassTest-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ClassTag, classTag}
+
class AnyVals {
def f1 = (5: Any).getClass
def f2 = (5: AnyVal).getClass
@@ -52,7 +54,7 @@ class MoreAnyRefs {
object Test {
def returnTypes[T: ClassTag] = (
- classTag[T].erasure.getMethods.toList
+ classTag[T].runtimeClass.getMethods.toList
filter (_.getName startsWith "f")
sortBy (_.getName)
map (m => m.getName + ": " + m.getGenericReturnType.toString)
@@ -63,4 +65,4 @@ object Test {
returnTypes[AnyRefs] foreach println
returnTypes[MoreAnyRefs] foreach println
}
-}
+} \ No newline at end of file