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_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_classmanifests_arenot_concretetypetags.check6
-rw-r--r--test/files/neg/interop_classmanifests_arenot_concretetypetags.scala4
-rw-r--r--test/files/neg/interop_classtags_arenot_manifests.check4
-rw-r--r--test/files/neg/interop_classtags_arenot_manifests.scala3
-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.check6
-rw-r--r--test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.scala12
-rw-r--r--test/files/neg/interop_erasuretags_arenot_classmanifests.check4
-rw-r--r--test/files/neg/interop_erasuretags_arenot_classmanifests.scala9
-rw-r--r--test/files/neg/interop_erasuretags_arenot_manifests.check4
-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.check2
-rw-r--r--test/files/neg/interop_typetags_arenot_manifests.scala2
-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/Test.scala2
-rw-r--r--test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala2
-rw-r--r--test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala2
-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/t3692-new.check2
-rw-r--r--test/files/neg/t3692-new.scala1
-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
71 files changed, 305 insertions, 126 deletions
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..73b451d61c 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 ArrayTag 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..c12b2874dc 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 ArrayTag 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_classmanifests_arenot_concretetypetags.check b/test/files/neg/interop_classmanifests_arenot_concretetypetags.check
index d6fa564df4..e51324f241 100644
--- a/test/files/neg/interop_classmanifests_arenot_concretetypetags.check
+++ b/test/files/neg/interop_classmanifests_arenot_concretetypetags.check
@@ -1,4 +1,4 @@
-interop_classmanifests_arenot_concretetypetags.scala:3: error: No ConcreteTypeTag available for T
- println(concreteTypeTag[T])
- ^
+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
index 5b1ed55e47..f130f162cd 100644
--- a/test/files/neg/interop_classmanifests_arenot_concretetypetags.scala
+++ b/test/files/neg/interop_classmanifests_arenot_concretetypetags.scala
@@ -1,6 +1,8 @@
+import scala.reflect.runtime.universe._
+
object Test extends App {
def classManifestIsnotConcreteTypeTag[T: ClassManifest] = {
- println(concreteTypeTag[T])
+ println(implicitly[ConcreteTypeTag[T]])
}
classManifestIsnotConcreteTypeTag[Int]
diff --git a/test/files/neg/interop_classtags_arenot_manifests.check b/test/files/neg/interop_classtags_arenot_manifests.check
index 95f6a94d4b..2d1a896872 100644
--- a/test/files/neg/interop_classtags_arenot_manifests.check
+++ b/test/files/neg/interop_classtags_arenot_manifests.check
@@ -1,7 +1,7 @@
-interop_classtags_arenot_manifests.scala:3: error: No Manifest available for T.
+interop_classtags_arenot_manifests.scala:6: error: No Manifest available for T.
println(manifest[T])
^
-interop_classtags_arenot_manifests.scala:11: error: No Manifest available for T.
+interop_classtags_arenot_manifests.scala:14: 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
index 7351f7e305..5c4130ad6d 100644
--- a/test/files/neg/interop_classtags_arenot_manifests.scala
+++ b/test/files/neg/interop_classtags_arenot_manifests.scala
@@ -1,3 +1,6 @@
+import scala.reflect.{ArrayTag, arrayTag}
+import scala.reflect.{ClassTag, classTag}
+
object Test extends App {
def arrayTagIsnotManifest[T: ArrayTag] = {
println(manifest[T])
diff --git a/test/files/neg/interop_concretetypetags_arenot_classmanifests.check b/test/files/neg/interop_concretetypetags_arenot_classmanifests.check
new file mode 100644
index 0000000000..e2dacad6c2
--- /dev/null
+++ b/test/files/neg/interop_concretetypetags_arenot_classmanifests.check
@@ -0,0 +1,4 @@
+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
new file mode 100644
index 0000000000..70c87a78a6
--- /dev/null
+++ b/test/files/neg/interop_concretetypetags_arenot_classmanifests.scala
@@ -0,0 +1,11 @@
+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
new file mode 100644
index 0000000000..7a7d3bcef5
--- /dev/null
+++ b/test/files/neg/interop_concretetypetags_arenot_classtags.check
@@ -0,0 +1,4 @@
+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
new file mode 100644
index 0000000000..74e51e8a7a
--- /dev/null
+++ b/test/files/neg/interop_concretetypetags_arenot_classtags.scala
@@ -0,0 +1,12 @@
+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.check b/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.check
new file mode 100644
index 0000000000..fc550abb4d
--- /dev/null
+++ b/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.check
@@ -0,0 +1,6 @@
+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.
+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_concretetypetags_without_classtags_arenot_manifests.scala b/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.scala
new file mode 100644
index 0000000000..b9db4ac121
--- /dev/null
+++ b/test/files/neg/interop_concretetypetags_without_classtags_arenot_manifests.scala
@@ -0,0 +1,12 @@
+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_erasuretags_arenot_classmanifests.check b/test/files/neg/interop_erasuretags_arenot_classmanifests.check
deleted file mode 100644
index 4bb81108d1..0000000000
--- a/test/files/neg/interop_erasuretags_arenot_classmanifests.check
+++ /dev/null
@@ -1,4 +0,0 @@
-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
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.check b/test/files/neg/interop_erasuretags_arenot_manifests.check
deleted file mode 100644
index da3c03d371..0000000000
--- a/test/files/neg/interop_erasuretags_arenot_manifests.check
+++ /dev/null
@@ -1,4 +0,0 @@
-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
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
index 7761a747ff..e5a7adf340 100644
--- a/test/files/neg/interop_typetags_arenot_manifests.check
+++ b/test/files/neg/interop_typetags_arenot_manifests.check
@@ -1,4 +1,4 @@
-interop_typetags_arenot_manifests.scala:3: error: No Manifest available for T.
+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
index 4e2a04489b..7ed1f3857b 100644
--- a/test/files/neg/interop_typetags_arenot_manifests.scala
+++ b/test/files/neg/interop_typetags_arenot_manifests.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
object Test extends App {
def typeTagIsnotManifest[T: TypeTag] = {
println(manifest[T])
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/Test.scala b/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala
index 1302999da6..c0c9156b60 100644
--- a/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala
+++ b/test/files/neg/macro-reify-groundtypetag-hktypeparams-notags/Test.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Test extends App {
def fooNoTypeTagHK[C[_], T] = {
diff --git a/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala b/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala
index d2276ce333..a247c3fe7b 100644
--- a/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala
+++ b/test/files/neg/macro-reify-groundtypetag-typeparams-notags/Test.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Test extends App {
def fooNoTypeTag[T] = {
diff --git a/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala b/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala
index d82cdc33e9..52b5c1078d 100644
--- a/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala
+++ b/test/files/neg/macro-reify-groundtypetag-usetypetag/Test.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Test extends App {
def fooTypeTag[T: TypeTag] = {
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/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/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