summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/t5689.check7
-rw-r--r--test/files/neg/t5689.flags1
-rw-r--r--test/files/neg/t5689.scala6
-rw-r--r--test/files/run/toolbox_console_reporter.scala4
-rw-r--r--test/files/run/toolbox_silent_reporter.scala2
5 files changed, 17 insertions, 3 deletions
diff --git a/test/files/neg/t5689.check b/test/files/neg/t5689.check
new file mode 100644
index 0000000000..f286d08cfa
--- /dev/null
+++ b/test/files/neg/t5689.check
@@ -0,0 +1,7 @@
+t5689.scala:4: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.makro.Context)(i: c.Expr[Double]): c.Expr[String]
+ found : (c: scala.reflect.makro.Context)(i: c.Expr[Double]): c.Expr[Int]
+type mismatch for return type : c.Expr[String] does not conform to c.Expr[Int]
+ def returnsString(i: Double): String = macro returnsIntImpl
+ ^
+one error found
diff --git a/test/files/neg/t5689.flags b/test/files/neg/t5689.flags
new file mode 100644
index 0000000000..cd66464f2f
--- /dev/null
+++ b/test/files/neg/t5689.flags
@@ -0,0 +1 @@
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/t5689.scala b/test/files/neg/t5689.scala
new file mode 100644
index 0000000000..ef7a45b364
--- /dev/null
+++ b/test/files/neg/t5689.scala
@@ -0,0 +1,6 @@
+import scala.reflect.makro.Context
+
+object Macros {
+ def returnsString(i: Double): String = macro returnsIntImpl
+ def returnsIntImpl(c: Context)(i: c.Expr[Double]): c.Expr[Int] = ???
+}
diff --git a/test/files/run/toolbox_console_reporter.scala b/test/files/run/toolbox_console_reporter.scala
index fd244b40ec..1da9a6bc16 100644
--- a/test/files/run/toolbox_console_reporter.scala
+++ b/test/files/run/toolbox_console_reporter.scala
@@ -1,10 +1,10 @@
import scala.reflect.mirror._
object Test extends App {
- // todo. cannot test this unfortunately, because ConsoleReporter grabs Console.out too early
+ // todo. cannot test this unfortunately, because ConsoleFrontEnd grabs Console.out too early
// todo. and isn't affected by Console.setOut employed by partest to intercept output
- //val toolbox = mkToolBox(reporter = mkConsoleReporter(), options = "-deprecation")
+ //val toolbox = mkToolBox(frontEnd = mkConsoleFrontEnd(), options = "-deprecation")
//toolbox.runExpr(reify{
// object Utils {
// @deprecated("test", "2.10.0")
diff --git a/test/files/run/toolbox_silent_reporter.scala b/test/files/run/toolbox_silent_reporter.scala
index 7e9259946b..5f264f7d74 100644
--- a/test/files/run/toolbox_silent_reporter.scala
+++ b/test/files/run/toolbox_silent_reporter.scala
@@ -11,6 +11,6 @@ object Test extends App {
Utils.foo
})
println("============compiler messages============")
- toolbox.reporter.infos.foreach(println(_))
+ toolbox.frontEnd.infos.foreach(println(_))
println("=========================================")
} \ No newline at end of file