summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/interop_classmanifests_arepartially_typetags.check6
-rw-r--r--test/files/run/interop_classmanifests_arepartially_typetags.scala10
-rw-r--r--test/files/run/interop_classtags_are_classmanifests.check6
-rw-r--r--test/files/run/interop_classtags_are_classmanifests.scala17
-rw-r--r--test/files/run/interop_concretetypetags_are_classmanifests.check3
-rw-r--r--test/files/run/interop_concretetypetags_are_classmanifests.scala9
-rw-r--r--test/files/run/interop_concretetypetags_are_manifests.check3
-rw-r--r--test/files/run/interop_concretetypetags_are_manifests.scala9
-rw-r--r--test/files/run/interop_manifests_are_classtags.check24
-rw-r--r--test/files/run/interop_manifests_are_classtags.scala23
-rw-r--r--test/files/run/interop_manifests_are_concretetypetags.check6
-rw-r--r--test/files/run/interop_manifests_are_concretetypetags.scala10
-rw-r--r--test/files/run/interop_manifests_are_typetags.check6
-rw-r--r--test/files/run/interop_manifests_are_typetags.scala10
14 files changed, 142 insertions, 0 deletions
diff --git a/test/files/run/interop_classmanifests_arepartially_typetags.check b/test/files/run/interop_classmanifests_arepartially_typetags.check
new file mode 100644
index 0000000000..3dfcdccbec
--- /dev/null
+++ b/test/files/run/interop_classmanifests_arepartially_typetags.check
@@ -0,0 +1,6 @@
+T
+int
+T
+class java.lang.String
+T
+class [I
diff --git a/test/files/run/interop_classmanifests_arepartially_typetags.scala b/test/files/run/interop_classmanifests_arepartially_typetags.scala
new file mode 100644
index 0000000000..9bc1f32e86
--- /dev/null
+++ b/test/files/run/interop_classmanifests_arepartially_typetags.scala
@@ -0,0 +1,10 @@
+object Test extends App {
+ def classManifestIspartiallyTypeTag[T: ClassManifest] = {
+ println(typeTag[T].tpe)
+ println(typeTag[T].erasure)
+ }
+
+ classManifestIspartiallyTypeTag[Int]
+ classManifestIspartiallyTypeTag[String]
+ classManifestIspartiallyTypeTag[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/run/interop_classtags_are_classmanifests.check b/test/files/run/interop_classtags_are_classmanifests.check
new file mode 100644
index 0000000000..02393dff23
--- /dev/null
+++ b/test/files/run/interop_classtags_are_classmanifests.check
@@ -0,0 +1,6 @@
+Int
+java.lang.String
+Array[Int]
+Int
+java.lang.String
+Array[Int]
diff --git a/test/files/run/interop_classtags_are_classmanifests.scala b/test/files/run/interop_classtags_are_classmanifests.scala
new file mode 100644
index 0000000000..309c99a3f5
--- /dev/null
+++ b/test/files/run/interop_classtags_are_classmanifests.scala
@@ -0,0 +1,17 @@
+object Test extends App {
+ def arrayTagIsClassManifest[T: ArrayTag] = {
+ println(classManifest[T])
+ }
+
+ arrayTagIsClassManifest[Int]
+ arrayTagIsClassManifest[String]
+ arrayTagIsClassManifest[Array[Int]]
+
+ def classTagIsClassManifest[T: ClassTag] = {
+ println(classManifest[T])
+ }
+
+ classTagIsClassManifest[Int]
+ classTagIsClassManifest[String]
+ classTagIsClassManifest[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/run/interop_concretetypetags_are_classmanifests.check b/test/files/run/interop_concretetypetags_are_classmanifests.check
new file mode 100644
index 0000000000..c59e92d4eb
--- /dev/null
+++ b/test/files/run/interop_concretetypetags_are_classmanifests.check
@@ -0,0 +1,3 @@
+Int
+java.lang.String
+Array[Int]
diff --git a/test/files/run/interop_concretetypetags_are_classmanifests.scala b/test/files/run/interop_concretetypetags_are_classmanifests.scala
new file mode 100644
index 0000000000..b578d7e626
--- /dev/null
+++ b/test/files/run/interop_concretetypetags_are_classmanifests.scala
@@ -0,0 +1,9 @@
+object Test extends App {
+ def concreteTypeTagIsClassManifest[T: ConcreteTypeTag] = {
+ println(classManifest[T])
+ }
+
+ concreteTypeTagIsClassManifest[Int]
+ concreteTypeTagIsClassManifest[String]
+ concreteTypeTagIsClassManifest[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/run/interop_concretetypetags_are_manifests.check b/test/files/run/interop_concretetypetags_are_manifests.check
new file mode 100644
index 0000000000..c59e92d4eb
--- /dev/null
+++ b/test/files/run/interop_concretetypetags_are_manifests.check
@@ -0,0 +1,3 @@
+Int
+java.lang.String
+Array[Int]
diff --git a/test/files/run/interop_concretetypetags_are_manifests.scala b/test/files/run/interop_concretetypetags_are_manifests.scala
new file mode 100644
index 0000000000..731410bc10
--- /dev/null
+++ b/test/files/run/interop_concretetypetags_are_manifests.scala
@@ -0,0 +1,9 @@
+object Test extends App {
+ def concreteTypeTagIsManifest[T: ConcreteTypeTag] = {
+ println(manifest[T])
+ }
+
+ concreteTypeTagIsManifest[Int]
+ concreteTypeTagIsManifest[String]
+ concreteTypeTagIsManifest[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/run/interop_manifests_are_classtags.check b/test/files/run/interop_manifests_are_classtags.check
new file mode 100644
index 0000000000..07ff6b984a
--- /dev/null
+++ b/test/files/run/interop_manifests_are_classtags.check
@@ -0,0 +1,24 @@
+Int
+Int
+List()
+List(0, 0, 0, 0, 0)
+java.lang.String
+java.lang.String
+List()
+List(null, null, null, null, null)
+Array[Int]
+Array[Int]
+List()
+List(null, null, null, null, null)
+Int
+Int
+List()
+List(0, 0, 0, 0, 0)
+java.lang.String
+java.lang.String
+List()
+List(null, null, null, null, null)
+Array[Int]
+Array[Int]
+List()
+List(null, null, null, null, null)
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
diff --git a/test/files/run/interop_manifests_are_concretetypetags.check b/test/files/run/interop_manifests_are_concretetypetags.check
new file mode 100644
index 0000000000..edab85ecf1
--- /dev/null
+++ b/test/files/run/interop_manifests_are_concretetypetags.check
@@ -0,0 +1,6 @@
+Int
+int
+String
+class java.lang.String
+Array[Int]
+class [I
diff --git a/test/files/run/interop_manifests_are_concretetypetags.scala b/test/files/run/interop_manifests_are_concretetypetags.scala
new file mode 100644
index 0000000000..0b82a56d0a
--- /dev/null
+++ b/test/files/run/interop_manifests_are_concretetypetags.scala
@@ -0,0 +1,10 @@
+object Test extends App {
+ def manifestIsConcreteTypeTag[T: Manifest] = {
+ println(concreteTypeTag[T].tpe)
+ println(concreteTypeTag[T].erasure)
+ }
+
+ manifestIsConcreteTypeTag[Int]
+ manifestIsConcreteTypeTag[String]
+ manifestIsConcreteTypeTag[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/run/interop_manifests_are_typetags.check b/test/files/run/interop_manifests_are_typetags.check
new file mode 100644
index 0000000000..edab85ecf1
--- /dev/null
+++ b/test/files/run/interop_manifests_are_typetags.check
@@ -0,0 +1,6 @@
+Int
+int
+String
+class java.lang.String
+Array[Int]
+class [I
diff --git a/test/files/run/interop_manifests_are_typetags.scala b/test/files/run/interop_manifests_are_typetags.scala
new file mode 100644
index 0000000000..03a7b7b6d5
--- /dev/null
+++ b/test/files/run/interop_manifests_are_typetags.scala
@@ -0,0 +1,10 @@
+object Test extends App {
+ def manifestIsTypeTag[T: Manifest] = {
+ println(typeTag[T].tpe)
+ println(typeTag[T].erasure)
+ }
+
+ manifestIsTypeTag[Int]
+ manifestIsTypeTag[String]
+ manifestIsTypeTag[Array[Int]]
+} \ No newline at end of file