summaryrefslogtreecommitdiff
path: root/test/files/run/macro-basic
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/macro-basic')
-rw-r--r--test/files/run/macro-basic/Macros_1.scala10
-rw-r--r--test/files/run/macro-basic/Test_2.scala4
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/macro-basic/Macros_1.scala b/test/files/run/macro-basic/Macros_1.scala
new file mode 100644
index 0000000000..c2ea183abe
--- /dev/null
+++ b/test/files/run/macro-basic/Macros_1.scala
@@ -0,0 +1,10 @@
+object Macros {
+ object Shmacros {
+ def macro foo(x: Int): Int = x
+ }
+ def macro bar(x: Int): Int = x
+}
+
+class Macros {
+ def macro quux(x: Int): Int = x
+} \ No newline at end of file
diff --git a/test/files/run/macro-basic/Test_2.scala b/test/files/run/macro-basic/Test_2.scala
new file mode 100644
index 0000000000..e9a10e20c9
--- /dev/null
+++ b/test/files/run/macro-basic/Test_2.scala
@@ -0,0 +1,4 @@
+object Test extends App {
+ import Macros.Shmacros._
+ println(foo(2) + Macros.bar(2) * new Macros().quux(4))
+} \ No newline at end of file