summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-02-27 14:23:03 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-02-27 14:23:03 -0800
commitfabc9f1424824975943241b9bb2c9b7669f805bd (patch)
treef06a7e8edf3708811b48db2ff7f326726e3a6f9e
parent2c9177847dfeac4082b708b97d534a6f2ed5f564 (diff)
parentfef3c33b4af10b2ba0bf04aabe26265e21693337 (diff)
downloadscala-fabc9f1424824975943241b9bb2c9b7669f805bd.tar.gz
scala-fabc9f1424824975943241b9bb2c9b7669f805bd.tar.bz2
scala-fabc9f1424824975943241b9bb2c9b7669f805bd.zip
Merge pull request #3589 from xeno-by/topic/whitebox-typecheck-expecting-unitv2.11.0-RC1
test case that verifies SI-8352
-rw-r--r--test/files/pos/t8352.check0
-rw-r--r--test/files/pos/t8352/Macros_1.scala7
-rw-r--r--test/files/pos/t8352/Test_2.scala5
3 files changed, 12 insertions, 0 deletions
diff --git a/test/files/pos/t8352.check b/test/files/pos/t8352.check
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/files/pos/t8352.check
diff --git a/test/files/pos/t8352/Macros_1.scala b/test/files/pos/t8352/Macros_1.scala
new file mode 100644
index 0000000000..f5c8ce578f
--- /dev/null
+++ b/test/files/pos/t8352/Macros_1.scala
@@ -0,0 +1,7 @@
+import scala.reflect.macros.whitebox._
+import scala.language.experimental.macros
+
+object Macros {
+ def impl(c: Context)(x: c.Expr[Boolean]): c.Expr[Boolean] = x
+ def foo(x: Boolean): Boolean = macro impl
+} \ No newline at end of file
diff --git a/test/files/pos/t8352/Test_2.scala b/test/files/pos/t8352/Test_2.scala
new file mode 100644
index 0000000000..b5bfe92ffb
--- /dev/null
+++ b/test/files/pos/t8352/Test_2.scala
@@ -0,0 +1,5 @@
+object Test extends App {
+ def expectUnit() {
+ Macros.foo(true)
+ }
+} \ No newline at end of file