diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-04-22 22:02:34 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 17:55:35 +0200 |
commit | d4b8d8deefcdd9144ef39d1456b03aa693f93ff7 (patch) | |
tree | f634abc7f093d2154d583f1b268c4c7c3ed20001 /test/files/neg | |
parent | f54e5c8bbdd719b5c9375c64c2f66b841984456e (diff) | |
download | scala-d4b8d8deefcdd9144ef39d1456b03aa693f93ff7.tar.gz scala-d4b8d8deefcdd9144ef39d1456b03aa693f93ff7.tar.bz2 scala-d4b8d8deefcdd9144ef39d1456b03aa693f93ff7.zip |
interop between manifests and tags
Diffstat (limited to 'test/files/neg')
12 files changed, 89 insertions, 0 deletions
diff --git a/test/files/neg/interop_classmanifests_arenot_concretetypetags.check b/test/files/neg/interop_classmanifests_arenot_concretetypetags.check new file mode 100644 index 0000000000..d6fa564df4 --- /dev/null +++ b/test/files/neg/interop_classmanifests_arenot_concretetypetags.check @@ -0,0 +1,4 @@ +interop_classmanifests_arenot_concretetypetags.scala:3: error: No ConcreteTypeTag available for T
+ println(concreteTypeTag[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_classmanifests_arenot_concretetypetags.scala b/test/files/neg/interop_classmanifests_arenot_concretetypetags.scala new file mode 100644 index 0000000000..5b1ed55e47 --- /dev/null +++ b/test/files/neg/interop_classmanifests_arenot_concretetypetags.scala @@ -0,0 +1,9 @@ +object Test extends App { + def classManifestIsnotConcreteTypeTag[T: ClassManifest] = { + println(concreteTypeTag[T]) + } + + classManifestIsnotConcreteTypeTag[Int] + classManifestIsnotConcreteTypeTag[String] + classManifestIsnotConcreteTypeTag[Array[Int]] +}
\ No newline at end of file diff --git a/test/files/neg/interop_classtags_arenot_manifests.check b/test/files/neg/interop_classtags_arenot_manifests.check new file mode 100644 index 0000000000..95f6a94d4b --- /dev/null +++ b/test/files/neg/interop_classtags_arenot_manifests.check @@ -0,0 +1,7 @@ +interop_classtags_arenot_manifests.scala:3: error: No Manifest available for T.
+ println(manifest[T])
+ ^
+interop_classtags_arenot_manifests.scala:11: error: No Manifest available for T.
+ println(manifest[T])
+ ^
+two errors found
diff --git a/test/files/neg/interop_classtags_arenot_manifests.scala b/test/files/neg/interop_classtags_arenot_manifests.scala new file mode 100644 index 0000000000..7351f7e305 --- /dev/null +++ b/test/files/neg/interop_classtags_arenot_manifests.scala @@ -0,0 +1,17 @@ +object Test extends App { + def arrayTagIsnotManifest[T: ArrayTag] = { + println(manifest[T]) + } + + arrayTagIsnotManifest[Int] + arrayTagIsnotManifest[String] + arrayTagIsnotManifest[Array[Int]] + + def classTagIsnotManifest[T: ClassTag] = { + println(manifest[T]) + } + + classTagIsnotManifest[Int] + classTagIsnotManifest[String] + classTagIsnotManifest[Array[Int]] +}
\ No newline at end of file diff --git a/test/files/neg/interop_erasuretags_arenot_classmanifests.check b/test/files/neg/interop_erasuretags_arenot_classmanifests.check new file mode 100644 index 0000000000..4bb81108d1 --- /dev/null +++ b/test/files/neg/interop_erasuretags_arenot_classmanifests.check @@ -0,0 +1,4 @@ +interop_erasuretags_arenot_classmanifests.scala:3: error: could not find implicit value for parameter m: ClassManifest[T]
+ println(classManifest[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_erasuretags_arenot_classmanifests.scala b/test/files/neg/interop_erasuretags_arenot_classmanifests.scala new file mode 100644 index 0000000000..cf7d1ac257 --- /dev/null +++ b/test/files/neg/interop_erasuretags_arenot_classmanifests.scala @@ -0,0 +1,9 @@ +object Test extends App { + def erasureTagIsnotClassManifest[T: ErasureTag] = { + println(classManifest[T]) + } + + erasureTagIsnotClassManifest[Int] + erasureTagIsnotClassManifest[String] + erasureTagIsnotClassManifest[Array[Int]] +}
\ No newline at end of file diff --git a/test/files/neg/interop_erasuretags_arenot_manifests.check b/test/files/neg/interop_erasuretags_arenot_manifests.check new file mode 100644 index 0000000000..da3c03d371 --- /dev/null +++ b/test/files/neg/interop_erasuretags_arenot_manifests.check @@ -0,0 +1,4 @@ +interop_erasuretags_arenot_manifests.scala:3: error: No Manifest available for T.
+ println(manifest[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_erasuretags_arenot_manifests.scala b/test/files/neg/interop_erasuretags_arenot_manifests.scala new file mode 100644 index 0000000000..5c326549d8 --- /dev/null +++ b/test/files/neg/interop_erasuretags_arenot_manifests.scala @@ -0,0 +1,9 @@ +object Test extends App { + def erasureTagIsnotManifest[T: ErasureTag] = { + println(manifest[T]) + } + + erasureTagIsnotManifest[Int] + erasureTagIsnotManifest[String] + erasureTagIsnotManifest[Array[Int]] +}
\ No newline at end of file diff --git a/test/files/neg/interop_typetags_arenot_classmanifests.check b/test/files/neg/interop_typetags_arenot_classmanifests.check new file mode 100644 index 0000000000..9ed4fd43d4 --- /dev/null +++ b/test/files/neg/interop_typetags_arenot_classmanifests.check @@ -0,0 +1,4 @@ +interop_typetags_arenot_classmanifests.scala:3: error: could not find implicit value for parameter m: ClassManifest[T]
+ println(classManifest[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_typetags_arenot_classmanifests.scala b/test/files/neg/interop_typetags_arenot_classmanifests.scala new file mode 100644 index 0000000000..b1fbb7b5a6 --- /dev/null +++ b/test/files/neg/interop_typetags_arenot_classmanifests.scala @@ -0,0 +1,9 @@ +object Test extends App { + def typeTagIsnotClassManifest[T: TypeTag] = { + println(classManifest[T]) + } + + typeTagIsnotClassManifest[Int] + typeTagIsnotClassManifest[String] + typeTagIsnotClassManifest[Array[Int]] +}
\ No newline at end of file diff --git a/test/files/neg/interop_typetags_arenot_manifests.check b/test/files/neg/interop_typetags_arenot_manifests.check new file mode 100644 index 0000000000..7761a747ff --- /dev/null +++ b/test/files/neg/interop_typetags_arenot_manifests.check @@ -0,0 +1,4 @@ +interop_typetags_arenot_manifests.scala:3: error: No Manifest available for T.
+ println(manifest[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_typetags_arenot_manifests.scala b/test/files/neg/interop_typetags_arenot_manifests.scala new file mode 100644 index 0000000000..4e2a04489b --- /dev/null +++ b/test/files/neg/interop_typetags_arenot_manifests.scala @@ -0,0 +1,9 @@ +object Test extends App { + def typeTagIsnotManifest[T: TypeTag] = { + println(manifest[T]) + } + + typeTagIsnotManifest[Int] + typeTagIsnotManifest[String] + typeTagIsnotManifest[Array[Int]] +}
\ No newline at end of file |