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/t5271_1.check1
-rw-r--r--test/files/run/t5271_1.scala1
-rw-r--r--test/files/run/t5271_2.check2
-rw-r--r--test/files/run/t5271_2.scala1
-rw-r--r--test/files/run/t5271_3.check2
-rw-r--r--test/files/run/t5271_3.scala1
-rw-r--r--test/files/run/toolbox_console_reporter.scala4
-rw-r--r--test/files/run/toolbox_silent_reporter.scala2
11 files changed, 25 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/t5271_1.check b/test/files/run/t5271_1.check
index 7a728e5164..5245173228 100644
--- a/test/files/run/t5271_1.check
+++ b/test/files/run/t5271_1.check
@@ -9,3 +9,4 @@
};
()
}
+()
diff --git a/test/files/run/t5271_1.scala b/test/files/run/t5271_1.scala
index 5baa57c290..20cafa6a08 100644
--- a/test/files/run/t5271_1.scala
+++ b/test/files/run/t5271_1.scala
@@ -7,4 +7,5 @@ object Test extends App {
val toolbox = mkToolBox()
println(code.tree)
+ println(code.eval)
}
diff --git a/test/files/run/t5271_2.check b/test/files/run/t5271_2.check
index d8d6edeffc..0765b3a6a4 100644
--- a/test/files/run/t5271_2.check
+++ b/test/files/run/t5271_2.check
@@ -10,3 +10,5 @@
val c = C.apply(2, 2);
scala.this.Predef.println(c.foo.$times(c.bar))
}
+4
+()
diff --git a/test/files/run/t5271_2.scala b/test/files/run/t5271_2.scala
index 9820ebe692..af6491407c 100644
--- a/test/files/run/t5271_2.scala
+++ b/test/files/run/t5271_2.scala
@@ -9,4 +9,5 @@ object Test extends App {
val toolbox = mkToolBox()
println(code.tree)
+ println(code.eval)
}
diff --git a/test/files/run/t5271_3.check b/test/files/run/t5271_3.check
index 1d4f47c5df..2b920a36a8 100644
--- a/test/files/run/t5271_3.check
+++ b/test/files/run/t5271_3.check
@@ -17,3 +17,5 @@
val c = C.apply(2, 2);
scala.this.Predef.println(c.foo.$times(c.bar).$eq$eq(C.qwe))
}
+true
+()
diff --git a/test/files/run/t5271_3.scala b/test/files/run/t5271_3.scala
index 5fd94f4a2b..646b10a8e5 100644
--- a/test/files/run/t5271_3.scala
+++ b/test/files/run/t5271_3.scala
@@ -10,4 +10,5 @@ object Test extends App {
val toolbox = mkToolBox()
println(code.tree)
+ println(code.eval)
}
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