summaryrefslogtreecommitdiff
path: root/test/files/macros/Test.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/macros/Test.scala')
-rw-r--r--test/files/macros/Test.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/macros/Test.scala b/test/files/macros/Test.scala
new file mode 100644
index 0000000000..d8cdcf6756
--- /dev/null
+++ b/test/files/macros/Test.scala
@@ -0,0 +1,8 @@
+// macros should be built separately from their clients, so simple "scalac Printf.scala Test.scala" won't work
+// 1) first build the printf macro with "scalac -Xmacros Printf.scala"
+// 2) the build this file with "scalac -cp <output directory of compiling Printf.scala> Test.scala"
+
+object Test extends App {
+ import Printf._
+ printf("hello %s", "world")
+} \ No newline at end of file