diff options
Diffstat (limited to 'test/files/neg/macro-invalidshape')
-rw-r--r-- | test/files/neg/macro-invalidshape/Impls_1.scala | 5 | ||||
-rw-r--r-- | test/files/neg/macro-invalidshape/Macros_Test_2.scala | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/neg/macro-invalidshape/Impls_1.scala b/test/files/neg/macro-invalidshape/Impls_1.scala new file mode 100644 index 0000000000..4467021545 --- /dev/null +++ b/test/files/neg/macro-invalidshape/Impls_1.scala @@ -0,0 +1,5 @@ +import scala.reflect.macros.{Context => Ctx} + +object Impls { + def foo(c: Ctx)(x: c.Expr[Any]) = ??? +} diff --git a/test/files/neg/macro-invalidshape/Macros_Test_2.scala b/test/files/neg/macro-invalidshape/Macros_Test_2.scala new file mode 100644 index 0000000000..f39ad20c5d --- /dev/null +++ b/test/files/neg/macro-invalidshape/Macros_Test_2.scala @@ -0,0 +1,12 @@ +object Macros { + def foo1(x: Any) = macro 2 + def foo2(x: Any) = macro Impls.foo(null)(null) + def foo3(x: Any) = macro {2; Impls.foo} +} + +object Test extends App { + import Macros._ + foo1(42) + foo2(42) + foo3(42) +}
\ No newline at end of file |