summaryrefslogtreecommitdiff
path: root/test/files/run/macro-whitebox-structural/Impls_Macros_1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/macro-whitebox-structural/Impls_Macros_1.scala')
-rw-r--r--test/files/run/macro-whitebox-structural/Impls_Macros_1.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/macro-whitebox-structural/Impls_Macros_1.scala b/test/files/run/macro-whitebox-structural/Impls_Macros_1.scala
new file mode 100644
index 0000000000..1b975ca850
--- /dev/null
+++ b/test/files/run/macro-whitebox-structural/Impls_Macros_1.scala
@@ -0,0 +1,16 @@
+import scala.reflect.macros.WhiteboxContext
+import scala.language.experimental.macros
+
+object Macros {
+ def impl(c: WhiteboxContext) = {
+ import c.universe._
+ q"""
+ trait Foo {
+ def x = 2
+ }
+ new Foo {}
+ """
+ }
+
+ def foo = macro impl
+} \ No newline at end of file