summaryrefslogtreecommitdiff
path: root/test/files/neg/macro-invalidret
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/macro-invalidret')
-rw-r--r--test/files/neg/macro-invalidret/Impls_1.scala3
-rw-r--r--test/files/neg/macro-invalidret/Macros_Test_2.scala8
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/macro-invalidret/Impls_1.scala b/test/files/neg/macro-invalidret/Impls_1.scala
index d957b74512..b32463899e 100644
--- a/test/files/neg/macro-invalidret/Impls_1.scala
+++ b/test/files/neg/macro-invalidret/Impls_1.scala
@@ -4,4 +4,7 @@ import scala.reflect.runtime.{universe => ru}
object Impls {
def foo1(c: BlackboxContext) = 2
def foo2(c: BlackboxContext) = ru.Literal(ru.Constant(42))
+ def foo3(c: BlackboxContext) = ???
+ def foo5(c: BlackboxContext) = c.universe.Literal(c.universe.Constant(42))
+ def foo6(c: BlackboxContext) = c.Expr[Int](c.universe.Literal(c.universe.Constant(42)))
}
diff --git a/test/files/neg/macro-invalidret/Macros_Test_2.scala b/test/files/neg/macro-invalidret/Macros_Test_2.scala
index f8880fa023..8840f492ab 100644
--- a/test/files/neg/macro-invalidret/Macros_Test_2.scala
+++ b/test/files/neg/macro-invalidret/Macros_Test_2.scala
@@ -1,10 +1,18 @@
object Macros {
def foo1 = macro Impls.foo1
def foo2 = macro Impls.foo2
+ def foo3 = macro Impls.foo3
+ def foo4 = macro ???
+ def foo5 = macro Impls.foo5
+ def foo6 = macro Impls.foo6
}
object Test extends App {
import Macros._
foo1
foo2
+ foo3
+ foo4
+ foo5
+ foo6
} \ No newline at end of file