diff options
Diffstat (limited to 'tests/untried/neg/t7519-b/Mac_1.scala')
-rw-r--r-- | tests/untried/neg/t7519-b/Mac_1.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/untried/neg/t7519-b/Mac_1.scala b/tests/untried/neg/t7519-b/Mac_1.scala new file mode 100644 index 000000000..55b583d24 --- /dev/null +++ b/tests/untried/neg/t7519-b/Mac_1.scala @@ -0,0 +1,14 @@ +// get expected error message without package declaration +package ex + +import scala.language.experimental.macros +import scala.reflect.macros._ + +object IW { + def foo(a: String): String = ??? +} +object Mac { + def mac(s: String): String = macro macImpl + def macImpl(c: Context)(s: c.Expr[String]): c.Expr[String] = + c.universe.reify(IW.foo(s.splice)) +} |