summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-06-07 22:05:34 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-06-08 15:34:26 +0200
commit5acac4d806eb45afdf1e7716c727a97130b69651 (patch)
treef37a3fcaf44699d4c0272ffdacdf7929424bc784 /test/files/neg
parentbc5f42f51982eb473075bbd2f474a5d628813031 (diff)
downloadscala-5acac4d806eb45afdf1e7716c727a97130b69651.tar.gz
scala-5acac4d806eb45afdf1e7716c727a97130b69651.tar.bz2
scala-5acac4d806eb45afdf1e7716c727a97130b69651.zip
TypeTag => AbsTypeTag, ConcreteTypeTag => TypeTag
This protects everyone from the confusion caused by stuff like this: https://issues.scala-lang.org/browse/SI-5884
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/interop_abstypetags_arenot_classmanifests.check4
-rw-r--r--test/files/neg/interop_abstypetags_arenot_classmanifests.scala11
-rw-r--r--test/files/neg/interop_abstypetags_arenot_classtags.check4
-rw-r--r--test/files/neg/interop_abstypetags_arenot_classtags.scala12
-rw-r--r--test/files/neg/interop_abstypetags_arenot_manifests.check4
-rw-r--r--test/files/neg/interop_abstypetags_arenot_manifests.scala11
-rw-r--r--test/files/neg/interop_classmanifests_arenot_concretetypetags.check4
-rw-r--r--test/files/neg/interop_classmanifests_arenot_concretetypetags.scala11
-rw-r--r--test/files/neg/interop_classmanifests_arenot_typetags.check4
-rw-r--r--test/files/neg/interop_classmanifests_arenot_typetags.scala11
-rw-r--r--test/files/neg/interop_concretetypetags_arenot_classmanifests.check4
-rw-r--r--test/files/neg/interop_concretetypetags_arenot_classmanifests.scala11
-rw-r--r--test/files/neg/interop_concretetypetags_arenot_classtags.check4
-rw-r--r--test/files/neg/interop_concretetypetags_arenot_classtags.scala12
-rw-r--r--test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.scala12
-rw-r--r--test/files/neg/interop_typetags_arenot_manifests.check4
-rw-r--r--test/files/neg/interop_typetags_arenot_manifests.scala11
-rw-r--r--test/files/neg/interop_typetags_without_classtags_arenot_manifests.check (renamed from test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.check)2
-rw-r--r--test/files/neg/interop_typetags_without_classtags_arenot_manifests.scala12
-rw-r--r--test/files/neg/macro-reify-groundtypetag-hktypeparams-notags.check7
-rw-r--r--test/files/neg/macro-reify-groundtypetag-typeparams-notags.check7
-rw-r--r--test/files/neg/macro-reify-groundtypetag-usetypetag.check7
-rw-r--r--test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala9
-rw-r--r--test/files/neg/macro-reify-typetag-hktypeparams-notags.check7
-rw-r--r--test/files/neg/macro-reify-typetag-hktypeparams-notags/Test.scala (renamed from test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala)4
-rw-r--r--test/files/neg/macro-reify-typetag-typeparams-notags.check7
-rw-r--r--test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala (renamed from test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala)4
-rw-r--r--test/files/neg/macro-reify-typetag-useabstypetag.check7
-rw-r--r--test/files/neg/macro-reify-typetag-useabstypetag/Test.scala9
-rw-r--r--test/files/neg/t3692-old.check2
30 files changed, 109 insertions, 109 deletions
diff --git a/test/files/neg/interop_abstypetags_arenot_classmanifests.check b/test/files/neg/interop_abstypetags_arenot_classmanifests.check
new file mode 100644
index 0000000000..3134aadb58
--- /dev/null
+++ b/test/files/neg/interop_abstypetags_arenot_classmanifests.check
@@ -0,0 +1,4 @@
+interop_abstypetags_arenot_classmanifests.scala:5: error: could not find implicit value for parameter m: ClassManifest[T]
+ println(classManifest[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_abstypetags_arenot_classmanifests.scala b/test/files/neg/interop_abstypetags_arenot_classmanifests.scala
new file mode 100644
index 0000000000..c8567be5d4
--- /dev/null
+++ b/test/files/neg/interop_abstypetags_arenot_classmanifests.scala
@@ -0,0 +1,11 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ def absTypeTagIsnotClassManifest[T: AbsTypeTag] = {
+ println(classManifest[T])
+ }
+
+ absTypeTagIsnotClassManifest[Int]
+ absTypeTagIsnotClassManifest[String]
+ absTypeTagIsnotClassManifest[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/neg/interop_abstypetags_arenot_classtags.check b/test/files/neg/interop_abstypetags_arenot_classtags.check
new file mode 100644
index 0000000000..637db83e57
--- /dev/null
+++ b/test/files/neg/interop_abstypetags_arenot_classtags.check
@@ -0,0 +1,4 @@
+interop_abstypetags_arenot_classtags.scala:6: error: No ClassTag available for T
+ println(classTag[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_abstypetags_arenot_classtags.scala b/test/files/neg/interop_abstypetags_arenot_classtags.scala
new file mode 100644
index 0000000000..e3911c1588
--- /dev/null
+++ b/test/files/neg/interop_abstypetags_arenot_classtags.scala
@@ -0,0 +1,12 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.{ClassTag, classTag}
+
+object Test extends App {
+ def absTypeTagIsnotClassTag[T: AbsTypeTag] = {
+ println(classTag[T])
+ }
+
+ absTypeTagIsnotClassTag[Int]
+ absTypeTagIsnotClassTag[String]
+ absTypeTagIsnotClassTag[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/neg/interop_abstypetags_arenot_manifests.check b/test/files/neg/interop_abstypetags_arenot_manifests.check
new file mode 100644
index 0000000000..c80635543f
--- /dev/null
+++ b/test/files/neg/interop_abstypetags_arenot_manifests.check
@@ -0,0 +1,4 @@
+interop_abstypetags_arenot_manifests.scala:5: error: No Manifest available for T.
+ println(manifest[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_abstypetags_arenot_manifests.scala b/test/files/neg/interop_abstypetags_arenot_manifests.scala
new file mode 100644
index 0000000000..77a95048fd
--- /dev/null
+++ b/test/files/neg/interop_abstypetags_arenot_manifests.scala
@@ -0,0 +1,11 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ def absTypeTagIsnotManifest[T: AbsTypeTag] = {
+ println(manifest[T])
+ }
+
+ absTypeTagIsnotManifest[Int]
+ absTypeTagIsnotManifest[String]
+ absTypeTagIsnotManifest[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/neg/interop_classmanifests_arenot_concretetypetags.check b/test/files/neg/interop_classmanifests_arenot_concretetypetags.check
deleted file mode 100644
index e51324f241..0000000000
--- a/test/files/neg/interop_classmanifests_arenot_concretetypetags.check
+++ /dev/null
@@ -1,4 +0,0 @@
-interop_classmanifests_arenot_concretetypetags.scala:5: error: No ConcreteTypeTag available for T
- println(implicitly[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
deleted file mode 100644
index f130f162cd..0000000000
--- a/test/files/neg/interop_classmanifests_arenot_concretetypetags.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-import scala.reflect.runtime.universe._
-
-object Test extends App {
- def classManifestIsnotConcreteTypeTag[T: ClassManifest] = {
- println(implicitly[ConcreteTypeTag[T]])
- }
-
- classManifestIsnotConcreteTypeTag[Int]
- classManifestIsnotConcreteTypeTag[String]
- classManifestIsnotConcreteTypeTag[Array[Int]]
-} \ No newline at end of file
diff --git a/test/files/neg/interop_classmanifests_arenot_typetags.check b/test/files/neg/interop_classmanifests_arenot_typetags.check
new file mode 100644
index 0000000000..6675fd9eae
--- /dev/null
+++ b/test/files/neg/interop_classmanifests_arenot_typetags.check
@@ -0,0 +1,4 @@
+interop_classmanifests_arenot_typetags.scala:5: error: No TypeTag available for T
+ println(implicitly[TypeTag[T]])
+ ^
+one error found
diff --git a/test/files/neg/interop_classmanifests_arenot_typetags.scala b/test/files/neg/interop_classmanifests_arenot_typetags.scala
new file mode 100644
index 0000000000..29d03a8ec8
--- /dev/null
+++ b/test/files/neg/interop_classmanifests_arenot_typetags.scala
@@ -0,0 +1,11 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ def classManifestIsnotTypeTag[T: ClassManifest] = {
+ println(implicitly[TypeTag[T]])
+ }
+
+ classManifestIsnotTypeTag[Int]
+ classManifestIsnotTypeTag[String]
+ classManifestIsnotTypeTag[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/neg/interop_concretetypetags_arenot_classmanifests.check b/test/files/neg/interop_concretetypetags_arenot_classmanifests.check
deleted file mode 100644
index e2dacad6c2..0000000000
--- a/test/files/neg/interop_concretetypetags_arenot_classmanifests.check
+++ /dev/null
@@ -1,4 +0,0 @@
-interop_concretetypetags_arenot_classmanifests.scala:5: error: could not find implicit value for parameter m: ClassManifest[T]
- println(classManifest[T])
- ^
-one error found
diff --git a/test/files/neg/interop_concretetypetags_arenot_classmanifests.scala b/test/files/neg/interop_concretetypetags_arenot_classmanifests.scala
deleted file mode 100644
index 70c87a78a6..0000000000
--- a/test/files/neg/interop_concretetypetags_arenot_classmanifests.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-import scala.reflect.runtime.universe._
-
-object Test extends App {
- def concreteTypeTagIsnotClassManifest[T: ConcreteTypeTag] = {
- println(classManifest[T])
- }
-
- concreteTypeTagIsnotClassManifest[Int]
- concreteTypeTagIsnotClassManifest[String]
- concreteTypeTagIsnotClassManifest[Array[Int]]
-} \ No newline at end of file
diff --git a/test/files/neg/interop_concretetypetags_arenot_classtags.check b/test/files/neg/interop_concretetypetags_arenot_classtags.check
deleted file mode 100644
index 7a7d3bcef5..0000000000
--- a/test/files/neg/interop_concretetypetags_arenot_classtags.check
+++ /dev/null
@@ -1,4 +0,0 @@
-interop_concretetypetags_arenot_classtags.scala:6: error: No ClassTag available for T
- println(classTag[T])
- ^
-one error found
diff --git a/test/files/neg/interop_concretetypetags_arenot_classtags.scala b/test/files/neg/interop_concretetypetags_arenot_classtags.scala
deleted file mode 100644
index 74e51e8a7a..0000000000
--- a/test/files/neg/interop_concretetypetags_arenot_classtags.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-import scala.reflect.runtime.universe._
-import scala.reflect.{ClassTag, classTag}
-
-object Test extends App {
- def concreteTypeTagIsnotClassTag[T: ConcreteTypeTag] = {
- println(classTag[T])
- }
-
- concreteTypeTagIsnotClassTag[Int]
- concreteTypeTagIsnotClassTag[String]
- concreteTypeTagIsnotClassTag[Array[Int]]
-} \ No newline at end of file
diff --git a/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.scala b/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.scala
deleted file mode 100644
index b9db4ac121..0000000000
--- a/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-import scala.reflect.runtime.universe._
-import scala.reflect.ClassTag
-
-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/neg/interop_typetags_arenot_manifests.check b/test/files/neg/interop_typetags_arenot_manifests.check
deleted file mode 100644
index e5a7adf340..0000000000
--- a/test/files/neg/interop_typetags_arenot_manifests.check
+++ /dev/null
@@ -1,4 +0,0 @@
-interop_typetags_arenot_manifests.scala:5: 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
deleted file mode 100644
index 7ed1f3857b..0000000000
--- a/test/files/neg/interop_typetags_arenot_manifests.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-import scala.reflect.runtime.universe._
-
-object Test extends App {
- def typeTagIsnotManifest[T: TypeTag] = {
- println(manifest[T])
- }
-
- typeTagIsnotManifest[Int]
- typeTagIsnotManifest[String]
- typeTagIsnotManifest[Array[Int]]
-} \ No newline at end of file
diff --git a/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.check b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check
index fc550abb4d..a95f1ad308 100644
--- a/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.check
+++ b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check
@@ -1,4 +1,4 @@
-interop_concretetypetags_without_classtags_arenot_manifests.scala:6: error: to create a manifest here, it is necessary to interoperate with the type tag `evidence$1` in scope.
+interop_typetags_without_classtags_arenot_manifests.scala:6: error: to create a manifest here, it is necessary to interoperate with the type tag `evidence$1` in scope.
however typetag -> manifest conversion requires a class tag for the corresponding type to be present.
to proceed add a class tag to the type `T` (e.g. by introducing a context bound) and recompile.
println(manifest[T])
diff --git a/test/files/neg/interop_typetags_without_classtags_arenot_manifests.scala b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.scala
new file mode 100644
index 0000000000..0d48ae5cd0
--- /dev/null
+++ b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.scala
@@ -0,0 +1,12 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.ClassTag
+
+object Test extends App {
+ def typeTagWithoutClassTagIsnotManifest[T: TypeTag] = {
+ println(manifest[T])
+ }
+
+ typeTagWithoutClassTagIsnotManifest[Int]
+ typeTagWithoutClassTagIsnotManifest[String]
+ typeTagWithoutClassTagIsnotManifest[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags.check b/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags.check
deleted file mode 100644
index 39e90f827e..0000000000
--- a/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags.check
+++ /dev/null
@@ -1,7 +0,0 @@
-Test.scala:5: error: No ConcreteTypeTag available for C[T]
- println(implicitly[ConcreteTypeTag[C[T]]])
- ^
-Test.scala:6: error: No ConcreteTypeTag available for List[C[T]]
- println(implicitly[ConcreteTypeTag[List[C[T]]]])
- ^
-two errors found
diff --git a/test/files/neg/macro-reify-groundtypetag-typeparams-notags.check b/test/files/neg/macro-reify-groundtypetag-typeparams-notags.check
deleted file mode 100644
index 164ca3543f..0000000000
--- a/test/files/neg/macro-reify-groundtypetag-typeparams-notags.check
+++ /dev/null
@@ -1,7 +0,0 @@
-Test.scala:5: error: No ConcreteTypeTag available for T
- println(implicitly[ConcreteTypeTag[T]])
- ^
-Test.scala:6: error: No ConcreteTypeTag available for List[T]
- println(implicitly[ConcreteTypeTag[List[T]]])
- ^
-two errors found
diff --git a/test/files/neg/macro-reify-groundtypetag-usetypetag.check b/test/files/neg/macro-reify-groundtypetag-usetypetag.check
deleted file mode 100644
index 164ca3543f..0000000000
--- a/test/files/neg/macro-reify-groundtypetag-usetypetag.check
+++ /dev/null
@@ -1,7 +0,0 @@
-Test.scala:5: error: No ConcreteTypeTag available for T
- println(implicitly[ConcreteTypeTag[T]])
- ^
-Test.scala:6: error: No ConcreteTypeTag available for List[T]
- println(implicitly[ConcreteTypeTag[List[T]]])
- ^
-two errors found
diff --git a/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala b/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala
deleted file mode 100644
index 52b5c1078d..0000000000
--- a/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-import scala.reflect.runtime.universe._
-
-object Test extends App {
- def fooTypeTag[T: TypeTag] = {
- println(implicitly[ConcreteTypeTag[T]])
- println(implicitly[ConcreteTypeTag[List[T]]])
- }
- fooTypeTag[Int]
-} \ No newline at end of file
diff --git a/test/files/neg/macro-reify-typetag-hktypeparams-notags.check b/test/files/neg/macro-reify-typetag-hktypeparams-notags.check
new file mode 100644
index 0000000000..742d87b0a4
--- /dev/null
+++ b/test/files/neg/macro-reify-typetag-hktypeparams-notags.check
@@ -0,0 +1,7 @@
+Test.scala:5: error: No TypeTag available for C[T]
+ println(implicitly[TypeTag[C[T]]])
+ ^
+Test.scala:6: error: No TypeTag available for List[C[T]]
+ println(implicitly[TypeTag[List[C[T]]]])
+ ^
+two errors found
diff --git a/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala b/test/files/neg/macro-reify-typetag-hktypeparams-notags/Test.scala
index c0c9156b60..c7b1cedcd2 100644
--- a/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala
+++ b/test/files/neg/macro-reify-typetag-hktypeparams-notags/Test.scala
@@ -2,8 +2,8 @@ import scala.reflect.runtime.universe._
object Test extends App {
def fooNoTypeTagHK[C[_], T] = {
- println(implicitly[ConcreteTypeTag[C[T]]])
- println(implicitly[ConcreteTypeTag[List[C[T]]]])
+ println(implicitly[TypeTag[C[T]]])
+ println(implicitly[TypeTag[List[C[T]]]])
}
fooNoTypeTagHK[List, Int]
} \ No newline at end of file
diff --git a/test/files/neg/macro-reify-typetag-typeparams-notags.check b/test/files/neg/macro-reify-typetag-typeparams-notags.check
new file mode 100644
index 0000000000..db88260047
--- /dev/null
+++ b/test/files/neg/macro-reify-typetag-typeparams-notags.check
@@ -0,0 +1,7 @@
+Test.scala:5: error: No TypeTag available for T
+ println(implicitly[TypeTag[T]])
+ ^
+Test.scala:6: error: No TypeTag available for List[T]
+ println(implicitly[TypeTag[List[T]]])
+ ^
+two errors found
diff --git a/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala b/test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala
index a247c3fe7b..6d849cde3f 100644
--- a/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala
+++ b/test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala
@@ -2,8 +2,8 @@ import scala.reflect.runtime.universe._
object Test extends App {
def fooNoTypeTag[T] = {
- println(implicitly[ConcreteTypeTag[T]])
- println(implicitly[ConcreteTypeTag[List[T]]])
+ println(implicitly[TypeTag[T]])
+ println(implicitly[TypeTag[List[T]]])
}
fooNoTypeTag[Int]
} \ No newline at end of file
diff --git a/test/files/neg/macro-reify-typetag-useabstypetag.check b/test/files/neg/macro-reify-typetag-useabstypetag.check
new file mode 100644
index 0000000000..db88260047
--- /dev/null
+++ b/test/files/neg/macro-reify-typetag-useabstypetag.check
@@ -0,0 +1,7 @@
+Test.scala:5: error: No TypeTag available for T
+ println(implicitly[TypeTag[T]])
+ ^
+Test.scala:6: error: No TypeTag available for List[T]
+ println(implicitly[TypeTag[List[T]]])
+ ^
+two errors found
diff --git a/test/files/neg/macro-reify-typetag-useabstypetag/Test.scala b/test/files/neg/macro-reify-typetag-useabstypetag/Test.scala
new file mode 100644
index 0000000000..b66ad6c523
--- /dev/null
+++ b/test/files/neg/macro-reify-typetag-useabstypetag/Test.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ def fooTypeTag[T: AbsTypeTag] = {
+ println(implicitly[TypeTag[T]])
+ println(implicitly[TypeTag[List[T]]])
+ }
+ fooTypeTag[Int]
+} \ No newline at end of file
diff --git a/test/files/neg/t3692-old.check b/test/files/neg/t3692-old.check
index 9da7033239..a97a7d31ec 100644
--- a/test/files/neg/t3692-old.check
+++ b/test/files/neg/t3692-old.check
@@ -1,4 +1,4 @@
-t3692-old.scala:6: warning: object Manifest in package reflect is deprecated: Use `@scala.reflect.ConcreteTypeTag` instead
+t3692-old.scala:6: warning: object Manifest in package reflect is deprecated: Use TypeTag instead
new ManifestTester().toJavaMap(map)
^
t3692-old.scala:15: error: unreachable code