summaryrefslogtreecommitdiff
path: root/test/files/run/interop_manifests_are_classtags.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-04-22 22:02:34 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-04-23 17:55:35 +0200
commitd4b8d8deefcdd9144ef39d1456b03aa693f93ff7 (patch)
treef634abc7f093d2154d583f1b268c4c7c3ed20001 /test/files/run/interop_manifests_are_classtags.scala
parentf54e5c8bbdd719b5c9375c64c2f66b841984456e (diff)
downloadscala-d4b8d8deefcdd9144ef39d1456b03aa693f93ff7.tar.gz
scala-d4b8d8deefcdd9144ef39d1456b03aa693f93ff7.tar.bz2
scala-d4b8d8deefcdd9144ef39d1456b03aa693f93ff7.zip
interop between manifests and tags
Diffstat (limited to 'test/files/run/interop_manifests_are_classtags.scala')
-rw-r--r--test/files/run/interop_manifests_are_classtags.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/files/run/interop_manifests_are_classtags.scala b/test/files/run/interop_manifests_are_classtags.scala
new file mode 100644
index 0000000000..582cea3467
--- /dev/null
+++ b/test/files/run/interop_manifests_are_classtags.scala
@@ -0,0 +1,23 @@
+object Test extends App {
+ def classManifestIsClassTag[T: ClassManifest] = {
+ println(arrayTag[T])
+ println(erasureTag[T])
+ println(Array[T]().toList)
+ println(new Array[T](5).toList)
+ }
+
+ classManifestIsClassTag[Int]
+ classManifestIsClassTag[String]
+ classManifestIsClassTag[Array[Int]]
+
+ def manifestIsClassTag[T: Manifest] = {
+ println(arrayTag[T])
+ println(erasureTag[T])
+ println(Array[T]().toList)
+ println(new Array[T](5).toList)
+ }
+
+ manifestIsClassTag[Int]
+ manifestIsClassTag[String]
+ manifestIsClassTag[Array[Int]]
+} \ No newline at end of file