summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/classtags_contextbound_a.check2
-rw-r--r--test/files/neg/classtags_contextbound_b.check2
-rw-r--r--test/files/neg/classtags_contextbound_b.scala2
-rw-r--r--test/files/neg/classtags_contextbound_c.check2
-rw-r--r--test/files/neg/classtags_contextbound_c.scala2
-rw-r--r--test/files/neg/classtags_dont_use_typetags.check2
-rw-r--r--test/files/neg/classtags_dont_use_typetags.scala2
-rw-r--r--test/files/neg/interop_abstypetags_arenot_classmanifests.check (renamed from test/files/neg/interop_erasuretags_arenot_classmanifests.check)2
-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.check (renamed from test/files/neg/interop_erasuretags_arenot_manifests.check)2
-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.scala9
-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_classtags_arenot_manifests.check7
-rw-r--r--test/files/neg/interop_classtags_arenot_manifests.scala10
-rw-r--r--test/files/neg/interop_erasuretags_arenot_classmanifests.scala9
-rw-r--r--test/files/neg/interop_erasuretags_arenot_manifests.scala9
-rw-r--r--test/files/neg/interop_typetags_arenot_classmanifests.check2
-rw-r--r--test/files/neg/interop_typetags_arenot_classmanifests.scala2
-rw-r--r--test/files/neg/interop_typetags_arenot_classtags.check4
-rw-r--r--test/files/neg/interop_typetags_arenot_classtags.scala12
-rw-r--r--test/files/neg/interop_typetags_arenot_manifests.check4
-rw-r--r--test/files/neg/interop_typetags_arenot_manifests.scala9
-rw-r--r--test/files/neg/interop_typetags_without_classtags_arenot_manifests.check6
-rw-r--r--test/files/neg/interop_typetags_without_classtags_arenot_manifests.scala12
-rw-r--r--test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala12
-rw-r--r--test/files/neg/macro-invalidimpl-f/Impls_1.scala6
-rw-r--r--test/files/neg/macro-invalidimpl-g/Impls_1.scala6
-rw-r--r--test/files/neg/macro-invalidsig-context-bounds.check8
-rw-r--r--test/files/neg/macro-invalidsig-context-bounds/Impls_1.scala5
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badargc/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badtype.check14
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badtype/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-implicit-params.check2
-rw-r--r--test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala9
-rw-r--r--test/files/neg/macro-invalidsig-params-badtype.check14
-rw-r--r--test/files/neg/macro-invalidsig-params-badtype/Impls_Macros_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-badtype.check2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-badtype/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-a/Impls_1.scala3
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-b/Impls_1.scala3
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-c/Impls_1.scala5
-rw-r--r--test/files/neg/macro-invalidusage-methodvaluesyntax/Impls_1.scala6
-rw-r--r--test/files/neg/macro-override-method-overrides-macro/Impls_1.scala6
-rw-r--r--test/files/neg/macro-reify-groundtypetag-hktypeparams-notags.check7
-rw-r--r--test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala9
-rw-r--r--test/files/neg/macro-reify-groundtypetag-typeparams-notags.check7
-rw-r--r--test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala9
-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.scala9
-rw-r--r--test/files/neg/macro-reify-typetag-typeparams-notags.check7
-rw-r--r--test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala9
-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/macro-without-xmacros-a/Impls_1.scala14
-rw-r--r--test/files/neg/macro-without-xmacros-b/Impls_1.scala14
-rw-r--r--test/files/neg/reify_ann2b.check8
-rw-r--r--test/files/neg/reify_ann2b.scala7
-rw-r--r--test/files/neg/reify_metalevel_breach_+0_refers_to_1.check7
-rw-r--r--test/files/neg/reify_metalevel_breach_+0_refers_to_1.scala16
-rw-r--r--test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.check7
-rw-r--r--test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.scala14
-rw-r--r--test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.check7
-rw-r--r--test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.scala18
-rw-r--r--test/files/neg/reify_metalevel_breach_-1_refers_to_1.check7
-rw-r--r--test/files/neg/reify_metalevel_breach_-1_refers_to_1.scala16
-rw-r--r--test/files/neg/reify_nested_inner_refers_to_local.check7
-rw-r--r--test/files/neg/reify_nested_inner_refers_to_local.scala15
-rw-r--r--test/files/neg/t2775.check8
-rw-r--r--test/files/neg/t3692-new.check2
-rw-r--r--test/files/neg/t3692-new.scala1
-rw-r--r--test/files/neg/t3692-old.check2
-rw-r--r--test/files/neg/t5334_1.check2
-rw-r--r--test/files/neg/t5334_1.scala5
-rw-r--r--test/files/neg/t5334_2.check2
-rw-r--r--test/files/neg/t5334_2.scala5
-rw-r--r--test/files/neg/t5452-new.check6
-rw-r--r--test/files/neg/t5452-new.scala6
-rw-r--r--test/files/neg/t5452-old.scala2
-rw-r--r--test/files/neg/t5666.check36
86 files changed, 388 insertions, 221 deletions
diff --git a/test/files/neg/classtags_contextbound_a.check b/test/files/neg/classtags_contextbound_a.check
index a4fd37506d..f4b6ff5af1 100644
--- a/test/files/neg/classtags_contextbound_a.check
+++ b/test/files/neg/classtags_contextbound_a.check
@@ -1,4 +1,4 @@
-classtags_contextbound_a.scala:2: error: No ArrayTag available for T
+classtags_contextbound_a.scala:2: error: No ClassTag available for T
def foo[T] = Array[T]()
^
one error found
diff --git a/test/files/neg/classtags_contextbound_b.check b/test/files/neg/classtags_contextbound_b.check
index f1f48bed72..e08ab504bc 100644
--- a/test/files/neg/classtags_contextbound_b.check
+++ b/test/files/neg/classtags_contextbound_b.check
@@ -1,4 +1,4 @@
-classtags_contextbound_b.scala:3: error: No ClassTag available for T
+classtags_contextbound_b.scala:5: error: No ClassTag available for T
def foo[T] = mkArray[T]
^
one error found
diff --git a/test/files/neg/classtags_contextbound_b.scala b/test/files/neg/classtags_contextbound_b.scala
index 3247a8ff29..a189f9aa65 100644
--- a/test/files/neg/classtags_contextbound_b.scala
+++ b/test/files/neg/classtags_contextbound_b.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ClassTag, classTag}
+
object Test extends App {
def mkArray[T: ClassTag] = Array[T]()
def foo[T] = mkArray[T]
diff --git a/test/files/neg/classtags_contextbound_c.check b/test/files/neg/classtags_contextbound_c.check
index a1c5eddfe1..f8768eea2b 100644
--- a/test/files/neg/classtags_contextbound_c.check
+++ b/test/files/neg/classtags_contextbound_c.check
@@ -1,4 +1,4 @@
-classtags_contextbound_c.scala:2: error: No ArrayTag available for T
+classtags_contextbound_c.scala:4: error: No ClassTag available for T
def mkArray[T] = Array[T]()
^
one error found
diff --git a/test/files/neg/classtags_contextbound_c.scala b/test/files/neg/classtags_contextbound_c.scala
index 0b63f8407e..54c616ce7e 100644
--- a/test/files/neg/classtags_contextbound_c.scala
+++ b/test/files/neg/classtags_contextbound_c.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ClassTag, classTag}
+
object Test extends App {
def mkArray[T] = Array[T]()
def foo[T: ClassTag] = mkArray[T]
diff --git a/test/files/neg/classtags_dont_use_typetags.check b/test/files/neg/classtags_dont_use_typetags.check
index c7d2fba35b..24585e7c3f 100644
--- a/test/files/neg/classtags_dont_use_typetags.check
+++ b/test/files/neg/classtags_dont_use_typetags.check
@@ -1,4 +1,4 @@
-classtags_dont_use_typetags.scala:2: error: No ArrayTag available for T
+classtags_dont_use_typetags.scala:4: error: No ClassTag available for T
def foo[T: TypeTag] = Array[T]()
^
one error found
diff --git a/test/files/neg/classtags_dont_use_typetags.scala b/test/files/neg/classtags_dont_use_typetags.scala
index 0f675f71aa..2eb842b860 100644
--- a/test/files/neg/classtags_dont_use_typetags.scala
+++ b/test/files/neg/classtags_dont_use_typetags.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
object Test extends App {
def foo[T: TypeTag] = Array[T]()
} \ No newline at end of file
diff --git a/test/files/neg/interop_erasuretags_arenot_classmanifests.check b/test/files/neg/interop_abstypetags_arenot_classmanifests.check
index 4bb81108d1..3134aadb58 100644
--- a/test/files/neg/interop_erasuretags_arenot_classmanifests.check
+++ b/test/files/neg/interop_abstypetags_arenot_classmanifests.check
@@ -1,4 +1,4 @@
-interop_erasuretags_arenot_classmanifests.scala:3: error: could not find implicit value for parameter m: ClassManifest[T]
+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_erasuretags_arenot_manifests.check b/test/files/neg/interop_abstypetags_arenot_manifests.check
index da3c03d371..c80635543f 100644
--- a/test/files/neg/interop_erasuretags_arenot_manifests.check
+++ b/test/files/neg/interop_abstypetags_arenot_manifests.check
@@ -1,4 +1,4 @@
-interop_erasuretags_arenot_manifests.scala:3: error: No Manifest available for T.
+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 d6fa564df4..0000000000
--- a/test/files/neg/interop_classmanifests_arenot_concretetypetags.check
+++ /dev/null
@@ -1,4 +0,0 @@
-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
deleted file mode 100644
index 5b1ed55e47..0000000000
--- a/test/files/neg/interop_classmanifests_arenot_concretetypetags.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-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_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_classtags_arenot_manifests.check b/test/files/neg/interop_classtags_arenot_manifests.check
index 95f6a94d4b..6982f0b805 100644
--- a/test/files/neg/interop_classtags_arenot_manifests.check
+++ b/test/files/neg/interop_classtags_arenot_manifests.check
@@ -1,7 +1,4 @@
-interop_classtags_arenot_manifests.scala:3: error: No Manifest available for T.
+interop_classtags_arenot_manifests.scala:5: 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
+one error found
diff --git a/test/files/neg/interop_classtags_arenot_manifests.scala b/test/files/neg/interop_classtags_arenot_manifests.scala
index 7351f7e305..391143c6e8 100644
--- a/test/files/neg/interop_classtags_arenot_manifests.scala
+++ b/test/files/neg/interop_classtags_arenot_manifests.scala
@@ -1,12 +1,6 @@
-object Test extends App {
- def arrayTagIsnotManifest[T: ArrayTag] = {
- println(manifest[T])
- }
-
- arrayTagIsnotManifest[Int]
- arrayTagIsnotManifest[String]
- arrayTagIsnotManifest[Array[Int]]
+import scala.reflect.{ClassTag, classTag}
+object Test extends App {
def classTagIsnotManifest[T: ClassTag] = {
println(manifest[T])
}
diff --git a/test/files/neg/interop_erasuretags_arenot_classmanifests.scala b/test/files/neg/interop_erasuretags_arenot_classmanifests.scala
deleted file mode 100644
index cf7d1ac257..0000000000
--- a/test/files/neg/interop_erasuretags_arenot_classmanifests.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-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.scala b/test/files/neg/interop_erasuretags_arenot_manifests.scala
deleted file mode 100644
index 5c326549d8..0000000000
--- a/test/files/neg/interop_erasuretags_arenot_manifests.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-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
index 9ed4fd43d4..403625b4da 100644
--- a/test/files/neg/interop_typetags_arenot_classmanifests.check
+++ b/test/files/neg/interop_typetags_arenot_classmanifests.check
@@ -1,4 +1,4 @@
-interop_typetags_arenot_classmanifests.scala:3: error: could not find implicit value for parameter m: ClassManifest[T]
+interop_typetags_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_typetags_arenot_classmanifests.scala b/test/files/neg/interop_typetags_arenot_classmanifests.scala
index b1fbb7b5a6..d07f4726f5 100644
--- a/test/files/neg/interop_typetags_arenot_classmanifests.scala
+++ b/test/files/neg/interop_typetags_arenot_classmanifests.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
object Test extends App {
def typeTagIsnotClassManifest[T: TypeTag] = {
println(classManifest[T])
diff --git a/test/files/neg/interop_typetags_arenot_classtags.check b/test/files/neg/interop_typetags_arenot_classtags.check
new file mode 100644
index 0000000000..673ad2f941
--- /dev/null
+++ b/test/files/neg/interop_typetags_arenot_classtags.check
@@ -0,0 +1,4 @@
+interop_typetags_arenot_classtags.scala:6: error: No ClassTag available for T
+ println(classTag[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_typetags_arenot_classtags.scala b/test/files/neg/interop_typetags_arenot_classtags.scala
new file mode 100644
index 0000000000..072c12adb0
--- /dev/null
+++ b/test/files/neg/interop_typetags_arenot_classtags.scala
@@ -0,0 +1,12 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.{ClassTag, classTag}
+
+object Test extends App {
+ def typeTagIsnotClassTag[T: TypeTag] = {
+ println(classTag[T])
+ }
+
+ typeTagIsnotClassTag[Int]
+ typeTagIsnotClassTag[String]
+ typeTagIsnotClassTag[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 7761a747ff..0000000000
--- a/test/files/neg/interop_typetags_arenot_manifests.check
+++ /dev/null
@@ -1,4 +0,0 @@
-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
deleted file mode 100644
index 4e2a04489b..0000000000
--- a/test/files/neg/interop_typetags_arenot_manifests.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-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_typetags_without_classtags_arenot_manifests.check b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check
new file mode 100644
index 0000000000..a95f1ad308
--- /dev/null
+++ b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check
@@ -0,0 +1,6 @@
+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])
+ ^
+one error found
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-basic-mamdmi/Impls_Macros_Test_1.scala b/test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala
index e9876e32e9..8abde907bb 100644
--- a/test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala
+++ b/test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala
@@ -2,21 +2,21 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
def bar(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
def quux(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
}
diff --git a/test/files/neg/macro-invalidimpl-f/Impls_1.scala b/test/files/neg/macro-invalidimpl-f/Impls_1.scala
index 06c6efbb1f..3b8f15b90c 100644
--- a/test/files/neg/macro-invalidimpl-f/Impls_1.scala
+++ b/test/files/neg/macro-invalidimpl-f/Impls_1.scala
@@ -2,10 +2,10 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def fooNullary(c: Ctx) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works"))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
def fooEmpty(c: Ctx)() = fooNullary(c)
-}
+} \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-g/Impls_1.scala b/test/files/neg/macro-invalidimpl-g/Impls_1.scala
index 06c6efbb1f..3b8f15b90c 100644
--- a/test/files/neg/macro-invalidimpl-g/Impls_1.scala
+++ b/test/files/neg/macro-invalidimpl-g/Impls_1.scala
@@ -2,10 +2,10 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def fooNullary(c: Ctx) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works"))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
def fooEmpty(c: Ctx)() = fooNullary(c)
-}
+} \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-context-bounds.check b/test/files/neg/macro-invalidsig-context-bounds.check
index 0401993335..b2ce4b1caa 100644
--- a/test/files/neg/macro-invalidsig-context-bounds.check
+++ b/test/files/neg/macro-invalidsig-context-bounds.check
@@ -1,4 +1,4 @@
-Impls_1.scala:4: error: macro implementations cannot have implicit parameters other than TypeTag evidences
- def foo[U: c.TypeTag: Numeric](c: Ctx) = {
- ^
-one error found
+Impls_1.scala:5: error: macro implementations cannot have implicit parameters other than TypeTag evidences
+ def foo[U: c.TypeTag: Numeric](c: Ctx) = {
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-context-bounds/Impls_1.scala b/test/files/neg/macro-invalidsig-context-bounds/Impls_1.scala
index 2eb2ab3947..2eef7aac8b 100644
--- a/test/files/neg/macro-invalidsig-context-bounds/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-context-bounds/Impls_1.scala
@@ -1,8 +1,9 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo[U: c.TypeTag: Numeric](c: Ctx) = {
- import c.mirror._
+ import c.universe._
Literal(Constant(42))
}
-}
+} \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-ctx-badargc/Impls_1.scala b/test/files/neg/macro-invalidsig-ctx-badargc/Impls_1.scala
index da28944d27..4d5d29158f 100644
--- a/test/files/neg/macro-invalidsig-ctx-badargc/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-ctx-badargc/Impls_1.scala
@@ -1,5 +1,3 @@
-import scala.reflect.api.{Mirror => Ctx}
-
object Impls {
def foo = ???
}
diff --git a/test/files/neg/macro-invalidsig-ctx-badtype.check b/test/files/neg/macro-invalidsig-ctx-badtype.check
index 3913a8e3cb..b1702bbca6 100644
--- a/test/files/neg/macro-invalidsig-ctx-badtype.check
+++ b/test/files/neg/macro-invalidsig-ctx-badtype.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context): c.Expr[Any]
- found : (c: scala.reflect.api.Mirror): Nothing
-type mismatch for parameter c: scala.reflect.makro.Context does not conform to scala.reflect.api.Mirror
- def foo = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.makro.Context): c.Expr[Any]
+ found : (c: scala.reflect.api.Universe): Nothing
+type mismatch for parameter c: scala.reflect.makro.Context does not conform to scala.reflect.api.Universe
+ def foo = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-ctx-badtype/Impls_1.scala b/test/files/neg/macro-invalidsig-ctx-badtype/Impls_1.scala
index 747a2e9ca8..cf1a4cf85c 100644
--- a/test/files/neg/macro-invalidsig-ctx-badtype/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-ctx-badtype/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.api.{Mirror => Ctx}
+import scala.reflect.api.{Universe => Ctx}
object Impls {
def foo(c: Ctx) = ???
diff --git a/test/files/neg/macro-invalidsig-implicit-params.check b/test/files/neg/macro-invalidsig-implicit-params.check
index 0dd1c27b50..6416ed0a09 100644
--- a/test/files/neg/macro-invalidsig-implicit-params.check
+++ b/test/files/neg/macro-invalidsig-implicit-params.check
@@ -1,4 +1,4 @@
-Impls_Macros_1.scala:4: error: macro implementations cannot have implicit parameters other than TypeTag evidences
+Impls_Macros_1.scala:5: error: macro implementations cannot have implicit parameters other than TypeTag evidences
def foo_targs[T, U: c.TypeTag](c: Ctx)(implicit x: c.Expr[Int]) = {
^
one error found
diff --git a/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala b/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala
index 662ad2ab52..5bfe73ec59 100644
--- a/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala
+++ b/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala
@@ -1,18 +1,19 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo_targs[T, U: c.TypeTag](c: Ctx)(implicit x: c.Expr[Int]) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val body = Block(
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("invoking foo_targs...")))),
- Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("type of prefix is: " + prefix.tpe)))),
+ Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("type of prefix is: " + prefix.staticTpe)))),
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("U is: " + implicitly[c.TypeTag[U]].tpe)))),
Literal(Constant(())))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
}
class Macros[T] {
def foo_targs[U](x: Int) = macro Impls.foo_targs[T, U]
-}
+} \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-params-badtype.check b/test/files/neg/macro-invalidsig-params-badtype.check
index 71a65aec84..e4f67e650a 100644
--- a/test/files/neg/macro-invalidsig-params-badtype.check
+++ b/test/files/neg/macro-invalidsig-params-badtype.check
@@ -1,7 +1,7 @@
-Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context)(x: c.Expr[Int]): c.Expr[Any]
- found : (c: scala.reflect.makro.Context)(x: c.mirror.Tree): Nothing
-type mismatch for parameter x: c.Expr[Int] does not conform to c.mirror.Tree
- def foo(x: Int) = macro Impls.foo
- ^
-one error found
+Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.makro.Context)(x: c.Expr[Int]): c.Expr[Any]
+ found : (c: scala.reflect.makro.Context)(x: c.universe.Tree): Nothing
+type mismatch for parameter x: c.Expr[Int] does not conform to c.universe.Tree
+ def foo(x: Int) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-params-badtype/Impls_Macros_1.scala b/test/files/neg/macro-invalidsig-params-badtype/Impls_Macros_1.scala
index 29220c1c82..6393e6d395 100644
--- a/test/files/neg/macro-invalidsig-params-badtype/Impls_Macros_1.scala
+++ b/test/files/neg/macro-invalidsig-params-badtype/Impls_Macros_1.scala
@@ -1,7 +1,7 @@
import scala.reflect.makro.{Context => Ctx}
object Impls {
- def foo(c: Ctx)(x: c.mirror.Tree) = ???
+ def foo(c: Ctx)(x: c.universe.Tree) = ???
}
object Macros {
diff --git a/test/files/neg/macro-invalidsig-tparams-badtype.check b/test/files/neg/macro-invalidsig-tparams-badtype.check
index bd1acc4a0a..9166db3574 100644
--- a/test/files/neg/macro-invalidsig-tparams-badtype.check
+++ b/test/files/neg/macro-invalidsig-tparams-badtype.check
@@ -1,6 +1,6 @@
Macros_Test_2.scala:2: error: macro implementation has wrong shape:
required: (c: scala.reflect.makro.Context): c.Expr[Any]
- found : (c: scala.reflect.makro.Context)(U: c.mirror.Type): Nothing
+ found : (c: scala.reflect.makro.Context)(U: c.universe.Type): Nothing
number of parameter sections differ
def foo[U] = macro Impls.foo[U]
^
diff --git a/test/files/neg/macro-invalidsig-tparams-badtype/Impls_1.scala b/test/files/neg/macro-invalidsig-tparams-badtype/Impls_1.scala
index b43251df33..9886331502 100644
--- a/test/files/neg/macro-invalidsig-tparams-badtype/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-tparams-badtype/Impls_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.makro.{Context => Ctx}
object Impls {
- def foo[U](c: Ctx)(U: c.mirror.Type) = ???
+ def foo[U](c: Ctx)(U: c.universe.Type) = ???
}
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-a/Impls_1.scala b/test/files/neg/macro-invalidsig-tparams-notparams-a/Impls_1.scala
index bbe5b4e519..ea472e6f91 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-a/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-a/Impls_1.scala
@@ -1,5 +1,6 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo[U: c.TypeTag](c: Ctx) = ???
-}
+} \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-b/Impls_1.scala b/test/files/neg/macro-invalidsig-tparams-notparams-b/Impls_1.scala
index db79ddbcd8..c4eb3d9b4a 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-b/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-b/Impls_1.scala
@@ -1,3 +1,4 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
@@ -7,4 +8,4 @@ object Impls {
println(V)
c.literalUnit
}
-}
+} \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-c/Impls_1.scala b/test/files/neg/macro-invalidsig-tparams-notparams-c/Impls_1.scala
index 43c5a2acd5..41facc881e 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-c/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-c/Impls_1.scala
@@ -1,11 +1,12 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo[T: c.TypeTag, U: c.TypeTag, V](c: Ctx)(implicit V: c.TypeTag[V]): c.Expr[Unit] = {
- import c.mirror._
+ import c.universe._
println(implicitly[c.TypeTag[T]])
println(implicitly[c.TypeTag[U]])
println(V)
c.literalUnit
}
-}
+} \ No newline at end of file
diff --git a/test/files/neg/macro-invalidusage-methodvaluesyntax/Impls_1.scala b/test/files/neg/macro-invalidusage-methodvaluesyntax/Impls_1.scala
index 8e52613b6d..31e758e9a0 100644
--- a/test/files/neg/macro-invalidusage-methodvaluesyntax/Impls_1.scala
+++ b/test/files/neg/macro-invalidusage-methodvaluesyntax/Impls_1.scala
@@ -2,8 +2,8 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works"))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/neg/macro-override-method-overrides-macro/Impls_1.scala b/test/files/neg/macro-override-method-overrides-macro/Impls_1.scala
index 0b127f5a59..d6493caad9 100644
--- a/test/files/neg/macro-override-method-overrides-macro/Impls_1.scala
+++ b/test/files/neg/macro-override-method-overrides-macro/Impls_1.scala
@@ -3,13 +3,13 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def impl(c: Ctx)(tag: String, x: c.Expr[_]) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(tag)), Literal(Constant(prefix.toString)), x.tree))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
def fooBString(c: Ctx)(x: c.Expr[_]) = impl(c)("fooBString", x)
def fooBInt(c: Ctx)(x: c.Expr[_]) = impl(c)("fooBInt", x)
def fooDInt(c: Ctx)(x: c.Expr[_]) = impl(c)("fooDInt", x)
def fooZString(c: Ctx)(x: c.Expr[_]) = impl(c)("fooZString", x)
-}
+} \ 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-hktypeparams-notags/Test.scala b/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala
deleted file mode 100644
index 1302999da6..0000000000
--- a/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-import scala.reflect.mirror._
-
-object Test extends App {
- def fooNoTypeTagHK[C[_], T] = {
- println(implicitly[ConcreteTypeTag[C[T]]])
- println(implicitly[ConcreteTypeTag[List[C[T]]]])
- }
- fooNoTypeTagHK[List, Int]
-} \ No newline at end of file
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-typeparams-notags/Test.scala b/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala
deleted file mode 100644
index d2276ce333..0000000000
--- a/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-import scala.reflect.mirror._
-
-object Test extends App {
- def fooNoTypeTag[T] = {
- println(implicitly[ConcreteTypeTag[T]])
- println(implicitly[ConcreteTypeTag[List[T]]])
- }
- fooNoTypeTag[Int]
-} \ No newline at end of file
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 d82cdc33e9..0000000000
--- a/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-import scala.reflect.mirror._
-
-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-typetag-hktypeparams-notags/Test.scala b/test/files/neg/macro-reify-typetag-hktypeparams-notags/Test.scala
new file mode 100644
index 0000000000..c7b1cedcd2
--- /dev/null
+++ b/test/files/neg/macro-reify-typetag-hktypeparams-notags/Test.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ def fooNoTypeTagHK[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-typetag-typeparams-notags/Test.scala b/test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala
new file mode 100644
index 0000000000..6d849cde3f
--- /dev/null
+++ b/test/files/neg/macro-reify-typetag-typeparams-notags/Test.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ def fooNoTypeTag[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/macro-without-xmacros-a/Impls_1.scala b/test/files/neg/macro-without-xmacros-a/Impls_1.scala
index e6cee46e85..0b6fbe240e 100644
--- a/test/files/neg/macro-without-xmacros-a/Impls_1.scala
+++ b/test/files/neg/macro-without-xmacros-a/Impls_1.scala
@@ -2,17 +2,17 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
- Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))))
+ import c.universe._
+ c.Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))))
}
def bar_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
- Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2)))))
+ import c.universe._
+ c.Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2)))))
}
def quux_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
- Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3)))))
+ import c.universe._
+ c.Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3)))))
}
-}
+} \ No newline at end of file
diff --git a/test/files/neg/macro-without-xmacros-b/Impls_1.scala b/test/files/neg/macro-without-xmacros-b/Impls_1.scala
index e6cee46e85..0b6fbe240e 100644
--- a/test/files/neg/macro-without-xmacros-b/Impls_1.scala
+++ b/test/files/neg/macro-without-xmacros-b/Impls_1.scala
@@ -2,17 +2,17 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
- Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))))
+ import c.universe._
+ c.Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))))
}
def bar_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
- Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2)))))
+ import c.universe._
+ c.Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2)))))
}
def quux_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
- Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3)))))
+ import c.universe._
+ c.Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3)))))
}
-}
+} \ No newline at end of file
diff --git a/test/files/neg/reify_ann2b.check b/test/files/neg/reify_ann2b.check
index 52bdbe5b7c..1cef405bef 100644
--- a/test/files/neg/reify_ann2b.check
+++ b/test/files/neg/reify_ann2b.check
@@ -1,4 +1,4 @@
-reify_ann2b.scala:6: error: inner classes cannot be classfile annotations
- class ann(bar: String) extends annotation.ClassfileAnnotation
- ^
-one error found
+reify_ann2b.scala:9: error: inner classes cannot be classfile annotations
+ class ann(bar: String) extends annotation.ClassfileAnnotation
+ ^
+one error found
diff --git a/test/files/neg/reify_ann2b.scala b/test/files/neg/reify_ann2b.scala
index 397d00210d..2076af34c8 100644
--- a/test/files/neg/reify_ann2b.scala
+++ b/test/files/neg/reify_ann2b.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
// test 1: reify
@@ -16,7 +19,7 @@ object Test extends App {
println(tree.toString)
// test 2: import and typecheck
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
println(ttree.toString)
diff --git a/test/files/neg/reify_metalevel_breach_+0_refers_to_1.check b/test/files/neg/reify_metalevel_breach_+0_refers_to_1.check
new file mode 100644
index 0000000000..efdbd7e282
--- /dev/null
+++ b/test/files/neg/reify_metalevel_breach_+0_refers_to_1.check
@@ -0,0 +1,7 @@
+reify_metalevel_breach_+0_refers_to_1.scala:10: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
+cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
+if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
+import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
+ inner.splice
+ ^
+one error found
diff --git a/test/files/neg/reify_metalevel_breach_+0_refers_to_1.scala b/test/files/neg/reify_metalevel_breach_+0_refers_to_1.scala
new file mode 100644
index 0000000000..9499960480
--- /dev/null
+++ b/test/files/neg/reify_metalevel_breach_+0_refers_to_1.scala
@@ -0,0 +1,16 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val code = reify{
+ val x = 2
+ val inner = reify{x}
+ inner.splice
+ };
+
+ val toolbox = cm.mkToolBox()
+ val evaluated = toolbox.runExpr(code.tree)
+ println("evaluated = " + evaluated)
+} \ No newline at end of file
diff --git a/test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.check b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.check
new file mode 100644
index 0000000000..91755c789a
--- /dev/null
+++ b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.check
@@ -0,0 +1,7 @@
+reify_metalevel_breach_-1_refers_to_0_a.scala:9: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
+cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
+if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
+import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
+ val code = reify{outer.splice.splice}
+ ^
+one error found
diff --git a/test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.scala b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.scala
new file mode 100644
index 0000000000..e6aaeb9426
--- /dev/null
+++ b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.scala
@@ -0,0 +1,14 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val x = 2
+ val outer = reify{reify{x}}
+ val code = reify{outer.splice.splice}
+
+ val toolbox = cm.mkToolBox()
+ val evaluated = toolbox.runExpr(code.tree)
+ println("evaluated = " + evaluated)
+} \ No newline at end of file
diff --git a/test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.check b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.check
new file mode 100644
index 0000000000..f703bfb05f
--- /dev/null
+++ b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.check
@@ -0,0 +1,7 @@
+reify_metalevel_breach_-1_refers_to_0_b.scala:12: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
+cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
+if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
+import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
+ }.splice
+ ^
+one error found
diff --git a/test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.scala b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.scala
new file mode 100644
index 0000000000..16dcae8683
--- /dev/null
+++ b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.scala
@@ -0,0 +1,18 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val x = 2
+ val code = reify{
+ {
+ val inner = reify{reify{x}}
+ inner.splice
+ }.splice
+ }
+
+ val toolbox = cm.mkToolBox()
+ val evaluated = toolbox.runExpr(code.tree)
+ println("evaluated = " + evaluated)
+} \ No newline at end of file
diff --git a/test/files/neg/reify_metalevel_breach_-1_refers_to_1.check b/test/files/neg/reify_metalevel_breach_-1_refers_to_1.check
new file mode 100644
index 0000000000..068e4accd2
--- /dev/null
+++ b/test/files/neg/reify_metalevel_breach_-1_refers_to_1.check
@@ -0,0 +1,7 @@
+reify_metalevel_breach_-1_refers_to_1.scala:10: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
+cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
+if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
+import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
+ inner.splice.splice
+ ^
+one error found
diff --git a/test/files/neg/reify_metalevel_breach_-1_refers_to_1.scala b/test/files/neg/reify_metalevel_breach_-1_refers_to_1.scala
new file mode 100644
index 0000000000..9600489f35
--- /dev/null
+++ b/test/files/neg/reify_metalevel_breach_-1_refers_to_1.scala
@@ -0,0 +1,16 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val code = reify{
+ val x = 2
+ val inner = reify{reify{x}}
+ inner.splice.splice
+ };
+
+ val toolbox = cm.mkToolBox()
+ val evaluated = toolbox.runExpr(code.tree)
+ println("evaluated = " + evaluated)
+} \ No newline at end of file
diff --git a/test/files/neg/reify_nested_inner_refers_to_local.check b/test/files/neg/reify_nested_inner_refers_to_local.check
new file mode 100644
index 0000000000..3f897bded9
--- /dev/null
+++ b/test/files/neg/reify_nested_inner_refers_to_local.check
@@ -0,0 +1,7 @@
+reify_nested_inner_refers_to_local.scala:9: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
+cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
+if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
+import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
+ reify{x}.splice
+ ^
+one error found
diff --git a/test/files/neg/reify_nested_inner_refers_to_local.scala b/test/files/neg/reify_nested_inner_refers_to_local.scala
new file mode 100644
index 0000000000..fcbc1f7865
--- /dev/null
+++ b/test/files/neg/reify_nested_inner_refers_to_local.scala
@@ -0,0 +1,15 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val code = reify{
+ val x = 2
+ reify{x}.splice
+ };
+
+ val toolbox = cm.mkToolBox()
+ val evaluated = toolbox.runExpr(code.tree)
+ println("evaluated = " + evaluated)
+} \ No newline at end of file
diff --git a/test/files/neg/t2775.check b/test/files/neg/t2775.check
index a1e950cf73..f357221cd9 100644
--- a/test/files/neg/t2775.check
+++ b/test/files/neg/t2775.check
@@ -1,4 +1,4 @@
-t2775.scala:1: error: cannot find array tag for element type B.this.T
-trait B[S] { type T = S; val c = new Array[T](1) }
- ^
-one error found
+t2775.scala:1: error: cannot find class tag for element type B.this.T
+trait B[S] { type T = S; val c = new Array[T](1) }
+ ^
+one error found
diff --git a/test/files/neg/t3692-new.check b/test/files/neg/t3692-new.check
index e013daca74..349e4fe48a 100644
--- a/test/files/neg/t3692-new.check
+++ b/test/files/neg/t3692-new.check
@@ -1,4 +1,4 @@
-t3692-new.scala:15: error: unreachable code
+t3692-new.scala:16: error: unreachable code
case m2: Map[T, Int] => new java.util.HashMap[T, Integer]
^
one error found
diff --git a/test/files/neg/t3692-new.scala b/test/files/neg/t3692-new.scala
index 46874b02e3..cebdcea393 100644
--- a/test/files/neg/t3692-new.scala
+++ b/test/files/neg/t3692-new.scala
@@ -1,3 +1,4 @@
+import scala.reflect.{ClassTag, classTag}
import java.lang.Integer
object Tester {
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
diff --git a/test/files/neg/t5334_1.check b/test/files/neg/t5334_1.check
index 1d5a7cbc01..eca854964a 100644
--- a/test/files/neg/t5334_1.check
+++ b/test/files/neg/t5334_1.check
@@ -1,4 +1,4 @@
-t5334_1.scala:4: error: implementation restriction: cannot reify block of type C that involves a type declared inside the block being reified. consider casting the return value to a suitable type
+t5334_1.scala:5: error: implementation restriction: cannot reify block of type C that involves a type declared inside the block being reified. consider casting the return value to a suitable type
reify {
^
one error found
diff --git a/test/files/neg/t5334_1.scala b/test/files/neg/t5334_1.scala
index a7de5a0915..b75badb145 100644
--- a/test/files/neg/t5334_1.scala
+++ b/test/files/neg/t5334_1.scala
@@ -1,8 +1,9 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
class C { override def toString = "C" }
new C
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/neg/t5334_2.check b/test/files/neg/t5334_2.check
index a62bfff7a5..e21f0d5967 100644
--- a/test/files/neg/t5334_2.check
+++ b/test/files/neg/t5334_2.check
@@ -1,4 +1,4 @@
-t5334_2.scala:4: error: implementation restriction: cannot reify block of type List[(C, C)] that involves a type declared inside the block being reified. consider casting the return value to a suitable type
+t5334_2.scala:5: error: implementation restriction: cannot reify block of type List[(C, C)] that involves a type declared inside the block being reified. consider casting the return value to a suitable type
reify {
^
one error found
diff --git a/test/files/neg/t5334_2.scala b/test/files/neg/t5334_2.scala
index fc6dfcd0c1..e082e3b8e3 100644
--- a/test/files/neg/t5334_2.scala
+++ b/test/files/neg/t5334_2.scala
@@ -1,8 +1,9 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
class C { override def toString() = "C" }
List((new C, new C))
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/neg/t5452-new.check b/test/files/neg/t5452-new.check
index bbd3734f74..4bbeff3644 100644
--- a/test/files/neg/t5452-new.check
+++ b/test/files/neg/t5452-new.check
@@ -1,7 +1,7 @@
-t5452-new.scala:28: error: overloaded method value apply with alternatives:
+t5452-new.scala:30: error: overloaded method value apply with alternatives:
()Queryable[CoffeesTable] <and>
- (t: Tree)(implicit evidence$2: ClassTag[CoffeesTable])Nothing <and>
- (implicit evidence$1: ClassTag[CoffeesTable])Nothing
+ (t: Tree)(implicit evidence$2: scala.reflect.ClassTag[CoffeesTable])Nothing <and>
+ (implicit evidence$1: scala.reflect.ClassTag[CoffeesTable])Nothing
cannot be applied to (Queryable[CoffeesTable])
Queryable[CoffeesTable]( q.treeFilter(null) )
^
diff --git a/test/files/neg/t5452-new.scala b/test/files/neg/t5452-new.scala
index c829de7d7c..b74b1550bd 100644
--- a/test/files/neg/t5452-new.scala
+++ b/test/files/neg/t5452-new.scala
@@ -1,7 +1,9 @@
+import scala.reflect.{ClassTag, classTag}
+
// /scala/trac/5452/a.scala
// Mon Feb 13 22:52:36 PST 2012
-// import scala.reflect.mirror._
+// import scala.reflect.runtime.universe._
trait Tree
@@ -26,4 +28,4 @@ trait CoffeesTable{
object Test extends App{
val q = new Queryable[CoffeesTable]
Queryable[CoffeesTable]( q.treeFilter(null) )
-}
+} \ No newline at end of file
diff --git a/test/files/neg/t5452-old.scala b/test/files/neg/t5452-old.scala
index 1032db7a4b..4f6dcbbe46 100644
--- a/test/files/neg/t5452-old.scala
+++ b/test/files/neg/t5452-old.scala
@@ -1,7 +1,7 @@
// /scala/trac/5452/a.scala
// Mon Feb 13 22:52:36 PST 2012
-// import scala.reflect.mirror._
+// import scala.reflect.runtime.universe._
trait Tree
diff --git a/test/files/neg/t5666.check b/test/files/neg/t5666.check
index 4289b00ade..1c714796ba 100644
--- a/test/files/neg/t5666.check
+++ b/test/files/neg/t5666.check
@@ -4,33 +4,33 @@ t5666.scala:2: error: class Any is abstract; cannot be instantiated
t5666.scala:3: error: class AnyVal is abstract; cannot be instantiated
new AnyVal
^
-t5666.scala:4: error: Double does not have a constructor
+t5666.scala:4: error: class Double is abstract; cannot be instantiated
new Double
- ^
-t5666.scala:5: error: Float does not have a constructor
+ ^
+t5666.scala:5: error: class Float is abstract; cannot be instantiated
new Float
- ^
-t5666.scala:6: error: Long does not have a constructor
+ ^
+t5666.scala:6: error: class Long is abstract; cannot be instantiated
new Long
- ^
-t5666.scala:7: error: Int does not have a constructor
+ ^
+t5666.scala:7: error: class Int is abstract; cannot be instantiated
new Int
- ^
-t5666.scala:8: error: Char does not have a constructor
+ ^
+t5666.scala:8: error: class Char is abstract; cannot be instantiated
new Char
- ^
-t5666.scala:9: error: Short does not have a constructor
+ ^
+t5666.scala:9: error: class Short is abstract; cannot be instantiated
new Short
- ^
-t5666.scala:10: error: Byte does not have a constructor
+ ^
+t5666.scala:10: error: class Byte is abstract; cannot be instantiated
new Byte
- ^
-t5666.scala:11: error: Boolean does not have a constructor
+ ^
+t5666.scala:11: error: class Boolean is abstract; cannot be instantiated
new Boolean
- ^
-t5666.scala:12: error: Unit does not have a constructor
+ ^
+t5666.scala:12: error: class Unit is abstract; cannot be instantiated
new Unit
- ^
+ ^
t5666.scala:13: error: class Nothing is abstract; cannot be instantiated
new Nothing
^